|
|
@ -833,15 +833,16 @@ export function flushSync(fn) {
|
|
|
|
result = 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;
|
|
|
|
is_flushing = true;
|
|
|
|
flush_queued_root_effects();
|
|
|
|
flush_queued_root_effects();
|
|
|
|
flush_tasks();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return /** @type {T} */ (result);
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
is_flushing_sync = previously_flushing_sync;
|
|
|
|
is_flushing_sync = previously_flushing_sync;
|
|
|
|
}
|
|
|
|
}
|
|
|
|