Skip to content

Commit 5e1ec58

Browse files
committed
flush less often
1 parent f0bb8dd commit 5e1ec58

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function flatten(sync, async, fn) {
3939
invoke_error_boundary(error, parent);
4040
}
4141

42-
batch?.flush();
42+
batch?.deactivate();
4343
})
4444
.catch((error) => {
4545
boundary.error(error);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ export class Batch {
228228
current_batch = this;
229229
}
230230

231+
deactivate() {
232+
current_batch = null;
233+
}
234+
231235
flush() {
232236
if (queued_root_effects.length > 0) {
233237
flush_queued_root_effects();

0 commit comments

Comments
 (0)