Skip to content

Commit

Permalink
fix: properly catch falsy components (withastro#3650)
Browse files Browse the repository at this point in the history
Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
natemoo-re and natemoo-re authored Jun 20, 2022
1 parent 991373f commit 3a6f2ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?`
);
Expand Down

0 comments on commit 3a6f2ff

Please sign in to comment.