Skip to content

Commit 359dc16

Browse files
committed
chore: avoid microtasks when flushing sync
1 parent 479cf5d commit 359dc16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,15 +832,15 @@ export function flushSync(fn) {
832832
flush_queued_root_effects();
833833
result = fn();
834834
}
835-
835+
836836
flush_tasks();
837-
837+
838838
while (queued_root_effects.length > 0) {
839839
is_flushing = true;
840840
flush_queued_root_effects();
841841
flush_tasks();
842842
}
843-
843+
844844
return /** @type {T} */ (result);
845845
} finally {
846846
is_flushing_sync = previously_flushing_sync;

0 commit comments

Comments
 (0)