pull/16197/head
Rich Harris 4 months ago
parent 0bd53105ec
commit bc1a4cad96

@ -570,7 +570,6 @@ export function flush_queued_root_effects() {
old_values.clear(); old_values.clear();
} }
} finally { } finally {
is_flushing = false;
is_updating_effect = was_updating_effect; is_updating_effect = was_updating_effect;
last_scheduled_effect = null; last_scheduled_effect = null;
@ -712,10 +711,8 @@ export function flushSync(fn) {
const batch = Batch.ensure(); const batch = Batch.ensure();
if (fn) { if (fn) {
is_flushing = true;
flush_queued_root_effects(); flush_queued_root_effects();
is_flushing = true;
result = fn(); result = fn();
} }
@ -730,7 +727,6 @@ export function flushSync(fn) {
return /** @type {T} */ (result); return /** @type {T} */ (result);
} }
is_flushing = true;
flush_queued_root_effects(); flush_queued_root_effects();
} }
} }

Loading…
Cancel
Save