Skip to content

Commit 6250ba5

Browse files
committed
fix: reconnect child deriveds when evaluating connected parent derived
fixes #17352
1 parent d2ae711 commit 6250ba5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,12 @@ export function get(signal) {
629629
}
630630

631631
if (
632-
is_updating_effect &&
633632
(derived.f & CONNECTED) === 0 &&
634-
(effect_tracking() || (active_effect !== null && (active_effect.f & BRANCH_EFFECT) !== 0))
633+
((is_updating_effect &&
634+
(effect_tracking() ||
635+
(active_effect !== null && (active_effect.f & BRANCH_EFFECT) !== 0))) ||
636+
// evaluating connected parent derived, so reconnect child deriveds too
637+
(active_reaction !== null && (active_reaction.f & CONNECTED) !== 0))
635638
) {
636639
reconnect(derived);
637640
}

0 commit comments

Comments
 (0)