fix: apply key animations on proxed arrays

pull/10113/head
Dominic Gannaway 3 years ago
parent ebbb5dd655
commit d43cd8559c

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: apply key animations on proxed arrays

@ -417,7 +417,8 @@ function reconcile_tracked_array(
insert_each_item_block(block, dom, is_controlled, null);
}
} else {
var should_update_block = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;
var is_animated = (flags & EACH_IS_ANIMATED) !== 0;
var should_update_block = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0 || is_animated;
var start = 0;
/** @type {null | Text | Element | Comment} */
@ -500,7 +501,6 @@ function reconcile_tracked_array(
mark_lis(sources);
}
// If keys are animated, we need to do updates before actual moves
var is_animated = (flags & EACH_IS_ANIMATED) !== 0;
var should_create;
if (is_animated) {
var i = b_length;

Loading…
Cancel
Save