mirror of https://github.com/sveltejs/svelte
fix: keep reactions up to date even when read outside of effect (#17295)
In #17105 one line in `update_reaction` was changed that can cause reactivity loss. It checks if the reaction is updated inside of an effect and only then will push to the reactions. The prior version had an additional check to still add to the reactions if there is already at least one reaction on the derived, indicating it is connected. Removing this check fixes #17263 while keeping correctness: a connected derived by definition at least has one reaction and therefore can properly cleanup.pull/17286/head
parent
1f3f1826e8
commit
794b8f3dfd
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: keep reactions up to date even when read outside of effect
|
||||
Loading…
Reference in new issue