summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/great-badgers-raise.md5
-rw-r--r--packages/astro/src/runtime/server/index.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/great-badgers-raise.md b/.changeset/great-badgers-raise.md
new file mode 100644
index 000000000..b26dc6bd2
--- /dev/null
+++ b/.changeset/great-badgers-raise.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Properly catch falsy components
diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts
index fecf3317f..6c7b12699 100644
--- a/packages/astro/src/runtime/server/index.ts
+++ b/packages/astro/src/runtime/server/index.ts
@@ -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?`
);