fix: properly catch falsy components (#3650)
Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
0519601b52
commit
d9f6dcf6ea
2 changed files with 6 additions and 1 deletions
5
.changeset/great-badgers-raise.md
Normal file
5
.changeset/great-badgers-raise.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Properly catch falsy components
|
|
@ -172,7 +172,7 @@ export async function renderComponent(
|
|||
return markHTMLString(output);
|
||||
}
|
||||
|
||||
if (Component === null && !_props['client:only']) {
|
||||
if (!Component && !_props['client:only']) {
|
||||
throw new Error(
|
||||
`Unable to render ${displayName} because it is ${Component}!\nDid you forget to import the component or is it possible there is a typo?`
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue