Skip to content

Commit b805245

Browse files
committed
fix
1 parent d7d528c commit b805245

File tree

1 file changed

+13
-13
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+13
-13
lines changed

packages/svelte/src/internal/client/reactivity/batch.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ export class Batch {
8383
source.v = current;
8484
}
8585

86-
for (const e of this.render_effects) {
87-
set_signal_status(e, DIRTY);
88-
schedule_effect(e);
89-
}
90-
91-
for (const e of this.effects) {
92-
set_signal_status(e, DIRTY);
93-
schedule_effect(e);
94-
}
95-
96-
this.render_effects = [];
97-
this.effects = [];
98-
9986
for (const root of root_effects) {
10087
process_effects(this, root);
10188
}
@@ -186,6 +173,19 @@ export class Batch {
186173
this.#pending -= 1;
187174

188175
if (this.#pending === 0) {
176+
for (const e of this.render_effects) {
177+
set_signal_status(e, DIRTY);
178+
schedule_effect(e);
179+
}
180+
181+
for (const e of this.effects) {
182+
set_signal_status(e, DIRTY);
183+
schedule_effect(e);
184+
}
185+
186+
this.render_effects = [];
187+
this.effects = [];
188+
189189
this.commit();
190190
}
191191
}

0 commit comments

Comments
 (0)