Open NikolayMakhonin opened 1 month ago
Svelte sets the value of a bound property to undefined when it removes a list component. Thus, simply opening/closing a window can damage the data.
I created a minimal example to reproduce this error. If you remove or simplify anything else there, the error will most likely stop appearing.
When you press the button, this code is executed:
items.set([new ItemData()]) showList.set(false)
The items list is completely changed, and we immediately hide the list component.
Next, you can see in the console that the value property was set to undefined, but I didn't ask for this.
value
undefined
https://svelte.dev/repl/ba76a57dd23847e7a0be5123cfe28d22?version=4.2.19
Change Items
No response
https://svelte.dev/repl/ba76a57dd23847e7a0be5123cfe28d22?version=4.2.19 Google Chrome Version 127.0.6533.120 Microsoft Windows [Version 10.0.19045.4780]
annoyance
This seems to be fixed by svelte 5
REPL
Describe the bug
Svelte sets the value of a bound property to undefined when it removes a list component. Thus, simply opening/closing a window can damage the data.
I created a minimal example to reproduce this error. If you remove or simplify anything else there, the error will most likely stop appearing.
When you press the button, this code is executed:
The items list is completely changed, and we immediately hide the list component.
Next, you can see in the console that the
value
property was set toundefined
, but I didn't ask for this.Reproduction
https://svelte.dev/repl/ba76a57dd23847e7a0be5123cfe28d22?version=4.2.19
Change Items
buttonvalue
was set toundefined
Logs
No response
System Info
Severity
annoyance