We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9208db commit d5ba3e2Copy full SHA for d5ba3e2
packages/svelte/src/internal/client/dom/blocks/branches.js
@@ -79,19 +79,22 @@ export class BranchManager {
79
}
80
81
82
- this.#batches.delete(batch);
83
-
84
for (const [b, k] of this.#batches) {
85
- if (b === batch) break;
+ this.#batches.delete(b);
+
+ if (b === batch) {
86
+ // keep values for newer batches
87
+ break;
88
+ }
89
90
const offscreen = this.#offscreen.get(k);
91
92
if (offscreen) {
93
+ // for older batches, destroy offscreen effects
94
+ // as they will never be committed
95
destroy_effect(offscreen.effect);
96
this.#offscreen.delete(k);
97
- this.#batches.delete(b);
98
99
100
// outro/destroy effects
0 commit comments