-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: key in p
could fail if p
is null
#11388
Conversation
|
Can you please add a test that fails without the fix? |
Hello @dummdidumm Yes, I am more than happy to provide a failing test, but to reproduce it I need to add a lot context (I can rework my component to remove all external dependencies, but it'll be big). Also, it is an issue that shows up interactively, while I have seen the |
Let's start with a repro and go from there |
Ok, so I have created the smallest Svelte Kit project possible. You can find the project here: Steps to reproduce:
As soon as you open the browser, you should get the error in the browser debugger console. I am pasting here the relevant messages: chunk-N5QL6BBT.js?v=2b4b5bdf:2491 Uncaught TypeError: Cannot use 'in' operator to search for 'Symbol($state)' in undefined
at Object.has (chunk-N5QL6BBT.js?v=2b4b5bdf:2491:15)
at Object.has (chunk-N5QL6BBT.js?v=2b4b5bdf:2457:16)
at Object.has (chunk-N5QL6BBT.js?v=2b4b5bdf:2457:16)
at Module.deep_read_state (chunk-PY2A4NTW.js?v=2b4b5bdf:1604:20)
at Input.svelte:59:15
at Object.fn (chunk-PY2A4NTW.js?v=2b4b5bdf:416:5)
at execute_reaction_fn (chunk-PY2A4NTW.js?v=2b4b5bdf:1052:22)
at execute_effect (chunk-PY2A4NTW.js?v=2b4b5bdf:1169:20)
at create_effect (chunk-PY2A4NTW.js?v=2b4b5bdf:368:7)
at render_effect (chunk-PY2A4NTW.js?v=2b4b5bdf:443:10)
has @ chunk-N5QL6BBT.js?v=2b4b5bdf:2491
has @ chunk-N5QL6BBT.js?v=2b4b5bdf:2457
has @ chunk-N5QL6BBT.js?v=2b4b5bdf:2457
deep_read_state @ chunk-PY2A4NTW.js?v=2b4b5bdf:1604
(anonymous) @ Input.svelte:59
(anonymous) @ chunk-PY2A4NTW.js?v=2b4b5bdf:416
execute_reaction_fn @ chunk-PY2A4NTW.js?v=2b4b5bdf:1052
execute_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:1169
create_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:368
render_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:443
legacy_pre_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:415
Input @ Input.svelte:59
(anonymous) @ chunk-N5QL6BBT.js?v=2b4b5bdf:135
execute_reaction_fn @ chunk-PY2A4NTW.js?v=2b4b5bdf:1052
execute_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:1169
create_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:368
branch @ chunk-PY2A4NTW.js?v=2b4b5bdf:449
(anonymous) @ chunk-N5QL6BBT.js?v=2b4b5bdf:131
execute_reaction_fn @ chunk-PY2A4NTW.js?v=2b4b5bdf:1052
execute_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:1169
create_effect @ chunk-PY2A4NTW.js?v=2b4b5bdf:368
block @ chunk-PY2A4NTW.js?v=2b4b5bdf:446
(anonymous) @ chunk-N5QL6BBT.js?v=2b4b5bdf:124
(anonymous) @ FormCreator.svelte:156 Hope it helps. I am always here to give you more feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimum reproducible - could you add this as a test to the runtime-legacy test suite? Thank you!
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
This commit adds a new Child component and its props to the prop-p-is-null sample in the Svelte package. The Child component receives props using the spread operator and the props are passed as undefined. This change ensures that the Child component is properly rendered with the correct props. Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Hello @dummdidumm, I have added the minimum reproducible test in the runtime-legacy test suite. Sorry it did take so long, I overlooked your previous message. |
I found a glitch with a complex input component while testing next.118. It worked fine in next.115 – maybe something changed in the updates? Hope this helps!
I run all tests before submitting.