From 16106028430c21c10725cbbb398d20a56395e1db Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Tue, 2 Jul 2024 14:15:47 +0100 Subject: [PATCH] tune --- packages/svelte/src/internal/client/runtime.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index bf5cfa65141e..b5ca243a1e2b 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -419,7 +419,6 @@ function remove_reaction(signal, dependency) { export function remove_reactions(signal, start_index) { const dependencies = signal.deps; if (dependencies !== null) { - var active_dependencies = start_index === 0 ? null : dependencies.slice(0, start_index); var visited = new Set(); let i; for (i = start_index; i < dependencies.length; i++) { @@ -428,10 +427,7 @@ export function remove_reactions(signal, start_index) { continue; } visited.add(dependency); - // Avoid removing a reaction if we know that it is active (start_index will not be 0) - if (active_dependencies === null || !active_dependencies.includes(dependency)) { - remove_reaction(signal, dependency); - } + remove_reaction(signal, dependency); } } }