@@ -57,9 +57,9 @@ export function index(_, i) {
57
57
* subsequent destruction. Used in each blocks
58
58
* @param {import('#client').EachItem[] } items
59
59
* @param {null | Node } controlled_anchor
60
- * @param {() => void } [callback]
60
+ * @param {Map<any, import("#client").EachItem> } items_map
61
61
*/
62
- function pause_effects ( items , controlled_anchor , callback ) {
62
+ function pause_effects ( items , controlled_anchor , items_map ) {
63
63
/** @type {import('#client').TransitionManager[] } */
64
64
var transitions = [ ] ;
65
65
var length = items . length ;
@@ -81,10 +81,11 @@ function pause_effects(items, controlled_anchor, callback) {
81
81
82
82
run_out_transitions ( transitions , ( ) => {
83
83
for ( var i = 0 ; i < length ; i ++ ) {
84
- destroy_effect ( items [ i ] . e , ! is_controlled ) ;
84
+ var item = items [ i ] ;
85
+ items_map . delete ( item . k ) ;
86
+ link ( item . prev , item . next ) ;
87
+ destroy_effect ( item . e , ! is_controlled ) ;
85
88
}
86
-
87
- if ( callback !== undefined ) callback ( ) ;
88
89
} ) ;
89
90
}
90
91
@@ -413,6 +414,7 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
413
414
}
414
415
}
415
416
417
+ < << << << Updated upstream
416
418
pause_effects ( to_destroy , controlled_anchor , ( ) => {
417
419
for ( var i = 0 ; i < destroy_length ; i += 1 ) {
418
420
var item = to_destroy [ i ] ;
@@ -421,6 +423,9 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
421
423
link ( item . prev , item . next ) ;
422
424
}
423
425
} ) ;
426
+ = === ===
427
+ pause_effects ( to_destroy , controlled_anchor , items ) ;
428
+ > >>> >>> Stashed changes
424
429
}
425
430
426
431
if ( is_animated ) {
0 commit comments