pull/16197/head
Rich Harris 5 months ago
parent ec81491093
commit 45f4cc5ffb

@ -35,8 +35,8 @@ export class Batch {
#pending = 0; #pending = 0;
/** @type {Set<Effect>} */ /** @type {Effect[]} */
effects = new Set(); effects = [];
/** @type {Set<Effect>} */ /** @type {Set<Effect>} */
skipped_effects = new Set(); skipped_effects = new Set();
@ -56,6 +56,8 @@ export class Batch {
schedule_effect(e); schedule_effect(e);
} }
this.effects = [];
for (const batch of batches) { for (const batch of batches) {
if (batch === this) continue; if (batch === this) continue;

@ -722,14 +722,14 @@ function flush_queued_root_effects() {
// store the effects on the batch so that they run next time, // store the effects on the batch so that they run next time,
// even if they don't get re-dirtied // even if they don't get re-dirtied
for (const e of render_effects) { for (const e of render_effects) {
batch.effects.add(e);
set_signal_status(e, CLEAN); set_signal_status(e, CLEAN);
} }
for (const e of effects) { for (const e of effects) {
batch.effects.add(e);
set_signal_status(e, CLEAN); set_signal_status(e, CLEAN);
} }
batch.effects.push(...render_effects, ...effects);
} }
revert(); revert();

Loading…
Cancel
Save