mirror of https://github.com/sveltejs/svelte
fix: prevent duplicate derived subscriptions on reconnect (#18899)
- A dirty disconnected derived registered newly reached dependencies during evaluation, then `reconnect()` registered them again and retained disposed graphs. - The connection model from [#17105](https://github.com/sveltejs/svelte/pull/17105) and reconnection added in [#17362](https://github.com/sveltejs/svelte/pull/17362) restore skipped old dependencies; recursive unfreezing from [#17682](https://github.com/sveltejs/svelte/pull/17682) requires preserving that lifecycle. - Made reconnection idempotent instead of skipping or moving it, preserving unchanged subscriptions and frozen-effect ordering. - Covered direct and nested derived graphs, existing and newly reached dependencies, and complete teardown across client rendering modes. Fixes https://github.com/sveltejs/svelte/issues/18898 --------- Co-authored-by: svelte-triage-bot <team@svelte.com>pull/18858/head
parent
3f885e3016
commit
c580b381f7
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: prevent duplicate subscriptions when reconnecting deriveds
|
||||
Loading…
Reference in new issue