pull/15895/head
Rich Harris 4 months ago
parent 1fef2592ae
commit 7cef534937

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

Loading…
Cancel
Save