summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/forty-turkeys-tap.md5
-rw-r--r--packages/astro/src/runtime/server/jsx.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/forty-turkeys-tap.md b/.changeset/forty-turkeys-tap.md
new file mode 100644
index 000000000..f7d6609ab
--- /dev/null
+++ b/.changeset/forty-turkeys-tap.md
@@ -0,0 +1,5 @@
+---
+"astro": patch
+---
+
+Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions.
diff --git a/packages/astro/src/runtime/server/jsx.ts b/packages/astro/src/runtime/server/jsx.ts
index b2aca1783..81bae422f 100644
--- a/packages/astro/src/runtime/server/jsx.ts
+++ b/packages/astro/src/runtime/server/jsx.ts
@@ -116,7 +116,7 @@ Did you forget to import the component or is it possible there is a typo?`);
}
extractSlots(children);
for (const [key, value] of Object.entries(props)) {
- if (value['$$slot']) {
+ if (value?.['$$slot']) {
_slots[key] = value;
delete props[key];
}