Skip to content

Commit 3cf1f18

Browse files
committed
Reinclude removed comment
1 parent 3263c62 commit 3cf1f18

File tree

2 files changed

+4
-1
lines changed
  • packages/svelte/src

2 files changed

+4
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export function EachBlock(node, context) {
8080
flags |= EACH_ITEM_IMMUTABLE;
8181
}
8282

83+
// Since `animate:` can only appear on elements that are the sole child of a keyed each block,
84+
// we can determine at compile time whether the each block is animated or not (in which
85+
// case it should measure animated elements before and after reconciliation).
8386
if (node.key && node.body.nodes.some(is_animate_directive)) {
8487
flags |= EACH_IS_ANIMATED;
8588
}

packages/svelte/src/internal/client/dom/blocks/each.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function reconcile(array, state, anchor, render_fn, flags, is_inert, get_key, ge
283283
var items = state.items;
284284
var first = state.first;
285285
var current = first;
286-
286+
287287
/** @type {undefined | Set<EachItem>} */
288288
var seen;
289289

0 commit comments

Comments
 (0)