Skip to content

Commit b616412

Browse files
Rich-Harristrueadm
andauthored
chore: avoid microtasks when flushing sync (alternative) (#15895)
* chore: avoid microtasks when flushing sync * chore: avoid microtasks when flushing sync * chore: avoid microtasks when flushing sync * tweak * WIP * another * more * tweak * fix * fix * belt and braces * Revert "belt and braces" This reverts commit f8de1cf. --------- Co-authored-by: Dominic Gannaway <[email protected]>
1 parent 8b7bea1 commit b616412

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/polite-melons-tickle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
chore: avoid microtasks when flushing sync

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

+2
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,8 @@ export function flushSync(fn) {
823823
if (fn) {
824824
is_flushing = true;
825825
flush_queued_root_effects();
826+
827+
is_flushing = true;
826828
result = fn();
827829
}
828830

0 commit comments

Comments
 (0)