From 1d7600092825468eda7c143f9dfc0d0b91710156 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 14 Nov 2025 15:17:31 -0500 Subject: [PATCH] note to self --- packages/svelte/src/internal/client/dom/blocks/each.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/svelte/src/internal/client/dom/blocks/each.js b/packages/svelte/src/internal/client/dom/blocks/each.js index 5637f61bf2..32c5cd8729 100644 --- a/packages/svelte/src/internal/client/dom/blocks/each.js +++ b/packages/svelte/src/internal/client/dom/blocks/each.js @@ -82,6 +82,9 @@ function pause_effects(state, to_destroy, controlled_anchor) { run_out_transitions(transitions, () => { var is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null; + // TODO only destroy effects if no pending batch needs them. otherwise, + // just set `item.o` back to `false` + // If we have a controlled anchor, it means that the each block is inside a single // DOM element, so we can apply a fast-path for clearing the contents of the element. if (is_controlled) {