chore: tweak each block runtime logic

pull/11862/head
Dominic Gannaway 2 years ago
parent 3c87a69999
commit dcb85a1688

@ -394,11 +394,12 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
const to_destroy = Array.from(seen); const to_destroy = Array.from(seen);
while (current) { while (current !== null) {
to_destroy.push(current); to_destroy.push(current);
current = current.next; current = current.next;
} }
if (to_destroy.length > 0) {
var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null; var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;
if (is_animated) { if (is_animated) {
@ -419,6 +420,7 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
link(item.prev, item.next); link(item.prev, item.next);
} }
}); });
}
if (is_animated) { if (is_animated) {
effect(() => { effect(() => {

Loading…
Cancel
Save