fix: apply key animations on proxied arrays (#10113)

* fix: apply key animations on proxed arrays

* fix: apply key animations on proxed arrays

* fix: apply key animations on proxed arrays
pull/10116/head
Dominic Gannaway 11 months ago committed by GitHub
parent ebbb5dd655
commit 6acf7f3fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save