flush less often

pull/15844/head
Rich Harris 3 months ago
parent f0bb8ddd58
commit 5e1ec58eff

@ -39,7 +39,7 @@ export function flatten(sync, async, fn) {
invoke_error_boundary(error, parent); invoke_error_boundary(error, parent);
} }
batch?.flush(); batch?.deactivate();
}) })
.catch((error) => { .catch((error) => {
boundary.error(error); boundary.error(error);

@ -228,6 +228,10 @@ export class Batch {
current_batch = this; current_batch = this;
} }
deactivate() {
current_batch = null;
}
flush() { flush() {
if (queued_root_effects.length > 0) { if (queued_root_effects.length > 0) {
flush_queued_root_effects(); flush_queued_root_effects();

Loading…
Cancel
Save