-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
I think I found a case in which Svelte updates components in the wrong order.
Reproduction
https://svelte.dev/repl/207e33065bdb41dcb53bfe8ebcfb8ced?version=3.55.0
Click the Button "remove".
There is an Error on the console: "Cannot read properties of undefined (reading 'points')"
In handleClick() (App.svelte):
Because of selected.set(...) all instances of ConnectionPoint will update in the next microtask.
Because of connections.set(...), some of these instances of ConnectionPoint should not exist any more, but Svelte tries to update them, before it updates the instances of Connection. This leads to the Error.
The problem would be solved, if Svelte would update the components in this order:
- first: App
- then: all instances of Connection (this should remove all instances of ConnectionPoints, that should not exist any more)
- then: all instances of ConnectionPoints
Logs
No response
System Info
repl, Svelte 3.55.0Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels