Skip to content

Commit bde51cd

Browse files
committed
typo
1 parent 5d6b755 commit bde51cd

File tree

1 file changed

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

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ export class Batch {
181181
var current_values = null;
182182

183183
/**
184-
* A batch is superseeded if all of its sources are also in the current batch.
184+
* A batch is superseded if all of its sources are also in the current batch.
185185
* If the current batch commits, we don't need the old batch anymore.
186186
* This also prevents memory leaks since the old batch will never be committed.
187187
* @type {Batch[]}
188188
*/
189-
var superseeded_batches = [];
189+
var superseded_batches = [];
190190

191191
// if there are multiple batches, we are 'time travelling' —
192192
// we need to undo the changes belonging to any batch
@@ -208,17 +208,17 @@ export class Batch {
208208
continue;
209209
}
210210

211-
let superseeded = is_prior_batch;
211+
let superseded = is_prior_batch;
212212

213213
for (const [source, previous] of batch.#previous) {
214214
if (!current_values.has(source)) {
215-
superseeded = false;
215+
superseded = false;
216216
current_values.set(source, { v: source.v, wv: source.wv });
217217
source.v = previous;
218218
}
219219
}
220220

221-
if (superseeded) superseeded_batches.push(batch);
221+
if (superseded) superseded_batches.push(batch);
222222
}
223223
}
224224

@@ -229,14 +229,14 @@ export class Batch {
229229
// if we didn't start any new async work, and no async work
230230
// is outstanding from a previous flush, commit
231231
if (this.#async_effects.length === 0 && this.#pending === 0) {
232-
if (superseeded_batches.length > 0) {
232+
if (superseded_batches.length > 0) {
233233
const own = [...this.#callbacks.keys()].map((c) => c());
234-
// A superseeded batch could have callbacks for e.g. destroying if blocks
234+
// A superseded batch could have callbacks for e.g. destroying if blocks
235235
// that are not part of the current batch because it already happened in the prior one,
236236
// and the corresponding block effect therefore returning early because nothing was changed from its
237237
// point of view, therefore not adding a callback to the current batch, so we gotta call them here.
238238
// We do it from newest to oldest to ensure the correct callback is applied.
239-
for (const batch of superseeded_batches.reverse()) {
239+
for (const batch of superseded_batches.reverse()) {
240240
for (const [effect, cb] of batch.#callbacks) {
241241
if (!own.includes(effect())) {
242242
cb();

0 commit comments

Comments
 (0)