Skip to content

Commit 16d0d85

Browse files
committed
chore: improve each block fast-path heuristic
1 parent 8562104 commit 16d0d85

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,7 @@ export const template_visitors = {
21382138

21392139
// The runtime needs to know what kind of each block this is in order to optimize for the
21402140
// key === item (we avoid extra allocations). In that case, the item doesn't need to be reactive.
2141-
// We can guarnatee this by knowing that in order for the item of the each block to change, they
2141+
// We can guarantee this by knowing that in order for the item of the each block to change, they
21422142
// would need to mutate the key/item directly in the array. Given that in runes mode we use ===
21432143
// equality, we can apply a fast-path (as long as the index isn't reactive).
21442144
let each_type = 0;

0 commit comments

Comments
 (0)