pull/15895/head
Rich Harris 4 months ago
parent 425a8d85e6
commit ec8bddc8ce

@ -833,15 +833,16 @@ export function flushSync(fn) {
result = fn();
}
flush_tasks();
while (true) {
flush_tasks();
if (queued_root_effects.length === 0) {
return /** @type {T} */ (result);
}
while (queued_root_effects.length > 0) {
is_flushing = true;
flush_queued_root_effects();
flush_tasks();
}
return /** @type {T} */ (result);
} finally {
is_flushing_sync = previously_flushing_sync;
}

Loading…
Cancel
Save