From 96e59c810c47f2014d7bcf441117417a3dbb0cfb Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 8 Jun 2024 08:03:44 -0400 Subject: [PATCH] another one --- .../svelte/src/internal/client/dom/blocks/each.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/each.js b/packages/svelte/src/internal/client/dom/blocks/each.js index c41b247844..0b6209c505 100644 --- a/packages/svelte/src/internal/client/dom/blocks/each.js +++ b/packages/svelte/src/internal/client/dom/blocks/each.js @@ -17,12 +17,10 @@ import { } from '../hydration.js'; import { clear_text_content, empty } from '../operations.js'; import { remove } from '../reconciler.js'; -import { untrack } from '../../runtime.js'; import { block, branch, destroy_effect, - effect, run_out_transitions, pause_children, pause_effect, @@ -31,6 +29,7 @@ import { import { source, mutable_source, set } from '../../reactivity/sources.js'; import { is_array, is_frozen } from '../../utils.js'; import { INERT, STATE_SYMBOL } from '../../constants.js'; +import { queue_micro_task } from '../task.js'; /** * The row of a keyed each block that is currently updating. We track this @@ -423,12 +422,10 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) { } if (is_animated) { - effect(() => { - untrack(() => { - for (item of to_animate) { - item.a?.apply(); - } - }); + queue_micro_task(() => { + for (item of to_animate) { + item.a?.apply(); + } }); } }