pull/16197/head
Rich Harris 5 months ago
parent 4680f38623
commit 29147fb70a

@ -94,7 +94,13 @@ export class Batch {
this.render_effects = [];
this.effects = [];
this.commit();
// commit changes
for (const fn of this.#callbacks) {
fn();
}
this.#callbacks.clear();
flush_queued_effects(render_effects);
flush_queued_effects(effects);
} else {
@ -173,14 +179,6 @@ export class Batch {
this.#callbacks.add(fn);
}
commit() {
for (const fn of this.#callbacks) {
fn();
}
this.#callbacks.clear();
}
static ensure() {
if (current_batch === null) {
if (batches.size === 0) {

Loading…
Cancel
Save