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 f8de1cf47a.

---------

Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
pull/15825/head
Rich Harris 4 months ago committed by GitHub
parent 8b7bea1624
commit b6164128b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: avoid microtasks when flushing sync

@ -823,6 +823,8 @@ export function flushSync(fn) {
if (fn) { if (fn) {
is_flushing = true; is_flushing = true;
flush_queued_root_effects(); flush_queued_root_effects();
is_flushing = true;
result = fn(); result = fn();
} }

Loading…
Cancel
Save