mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
fix: dont error on nullish prop values in jsx runtime (#10584)
* fix: prevent jsx runtime from erroring on nullish prop values when checking for slot props * chore: changeset
This commit is contained in:
parent
0ff5d72c78
commit
e648c5575a
2 changed files with 6 additions and 1 deletions
5
.changeset/forty-turkeys-tap.md
Normal file
5
.changeset/forty-turkeys-tap.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions.
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue