fix: flush batches whenever an async value resolves

pull/16912/head
Rich Harris 2 days ago
parent acdd93053d
commit 1ab675f717

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: flush batches whenever an async value resolves

@ -375,7 +375,6 @@ export class Batch {
decrement() { decrement() {
this.#pending -= 1; this.#pending -= 1;
if (this.#pending === 0) {
for (const e of this.#dirty_effects) { for (const e of this.#dirty_effects) {
set_signal_status(e, DIRTY); set_signal_status(e, DIRTY);
schedule_effect(e); schedule_effect(e);
@ -387,9 +386,6 @@ export class Batch {
} }
this.flush(); this.flush();
} else {
this.deactivate();
}
} }
/** @param {() => void} fn */ /** @param {() => void} fn */

Loading…
Cancel
Save