diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index 57d9dedf71..311c1e7875 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -684,16 +684,12 @@ export class Batch { collected_effects = null; // if render effects wrote to state, they may have invalidated themselves (or - // an ancestor), in which case newly collected effects will be destroyed - // and recreated — hand them over to the next batch instead of running them now - var next = /** @type {Batch | null} */ (/** @type {unknown} */ (current_batch)); - - if (next !== null && effects.length > length) { + // an ancestor), in which case newly collected effects should not run + if (effects.length > length) { for (var i = length; i < effects.length; i += 1) { var e = effects[i]; if (has_dirty_ancestor(e)) { - next.schedule(e); e.f |= DESTROYED; // prevent it from running in `flush_queued_effects` } }