Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kalepail authored Mar 29, 2024
2 parents 99c8fec + e648c55 commit 23b36e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/forty-turkeys-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/server/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 23b36e2

Please sign in to comment.