diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index c267e21574..8931d02009 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -770,6 +770,8 @@ export function get(signal) { var target = derived; while (parent !== null) { + // Attach the derived to the nearest parent effect, if there are deriveds + // in between then we also need to attach them too if ((parent.f & DERIVED) !== 0) { var parent_derived = /** @type {Derived} */ (parent);