From 6af7f9068c7879df8c8f3a312453c0162999f66b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 10 Mar 2026 22:00:49 -0400 Subject: [PATCH 1/2] tweak --- packages/svelte/src/internal/client/reactivity/batch.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index 6885c9118d..255751c324 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -503,6 +503,7 @@ export class Batch { batch.#blockers.delete(this); if (batch.#blockers.size === 0 && !batch.#is_deferred()) { + batch.activate(); batch.#revive(); batch.#process(); } @@ -527,9 +528,7 @@ export class Batch { this.#pending -= 1; if (blocking) this.#blocking_pending -= 1; - if (this.#decrement_queued || skip) { - return; - } + if (this.#decrement_queued || skip) return; this.#decrement_queued = true; From c313797422a1f014674ccc3cd8b5671f83affeb0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 10 Mar 2026 22:03:42 -0400 Subject: [PATCH 2/2] tweak --- .../svelte/src/internal/client/reactivity/batch.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index 255751c324..fe759e19d0 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -585,20 +585,14 @@ export class Batch { // we need to override values with the ones in this batch... batch_values = new Map(this.current); - var is_earlier = true; - - // ...and undo changes belonging to other batches - // that don't coincide with this batch + // ...and undo changes belonging to other batches unless they block this one for (const batch of batches) { - if (batch === this) { - is_earlier = false; - continue; - } + if (batch === this) continue; var intersects = false; var differs = false; - if (is_earlier) { + if (batch.id < this.id) { for (const source of batch.current.keys()) { intersects ||= this.current.has(source); differs ||= !this.current.has(source);