@@ -67,18 +67,18 @@ export function index(_, i) {
6767 * Pause multiple effects simultaneously, and coordinate their
6868 * subsequent destruction. Used in each blocks
6969 * @param {EachState } state
70- * @param {EachItem[] } to_destroy
70+ * @param {EachItem[] } items
7171 * @param {null | Node } controlled_anchor
7272 */
73- function pause_effects ( state , to_destroy , controlled_anchor ) {
73+ function pause_effects ( state , items , controlled_anchor ) {
7474 var items_map = state . items ;
7575
7676 /** @type {TransitionManager[] } */
7777 var transitions = [ ] ;
78- var length = to_destroy . length ;
78+ var length = items . length ;
7979
8080 for ( var i = 0 ; i < length ; i ++ ) {
81- pause_children ( to_destroy [ i ] . e , transitions , true ) ;
81+ pause_children ( items [ i ] . e , transitions , true ) ;
8282 }
8383
8484 var is_controlled = length > 0 && transitions . length === 0 && controlled_anchor !== null ;
@@ -91,12 +91,12 @@ function pause_effects(state, to_destroy, controlled_anchor) {
9191 clear_text_content ( parent_node ) ;
9292 parent_node . append ( /** @type {Element } */ ( controlled_anchor ) ) ;
9393 items_map . clear ( ) ;
94- link ( state , to_destroy [ 0 ] . prev , to_destroy [ length - 1 ] . next ) ;
94+ link ( state , items [ 0 ] . prev , items [ length - 1 ] . next ) ;
9595 }
9696
9797 run_out_transitions ( transitions , ( ) => {
9898 for ( var i = 0 ; i < length ; i ++ ) {
99- var item = to_destroy [ i ] ;
99+ var item = items [ i ] ;
100100 if ( ! is_controlled ) {
101101 items_map . delete ( item . k ) ;
102102 link ( state , item . prev , item . next ) ;
0 commit comments