Skip to content

Commit 667c0bb

Browse files
committed
remove deopt
1 parent 28c301a commit 667c0bb

File tree

1 file changed

+3
-4
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+3
-4
lines changed

packages/svelte/src/internal/client/dom/blocks/each.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
import { source, mutable_source, set } from '../../reactivity/sources.js';
2626
import { is_array, is_frozen, map_get, map_set } from '../../utils.js';
2727
import { STATE_SYMBOL } from '../../constants.js';
28-
import { noop } from '../../../shared/utils.js';
2928

3029
var NEW_ITEM = -1;
3130
var LIS_ITEM = -2;
@@ -47,9 +46,9 @@ export function set_current_each_item(item) {
4746
* subsequent destruction. Used in each blocks
4847
* @param {import('#client').Effect[]} effects
4948
* @param {null | Node} controlled_anchor
50-
* @param {() => void} callback
49+
* @param {null | (() => void)} callback
5150
*/
52-
function pause_effects(effects, controlled_anchor, callback = noop) {
51+
function pause_effects(effects, controlled_anchor, callback) {
5352
/** @type {import('#client').TransitionManager[]} */
5453
var transitions = [];
5554
var length = effects.length;
@@ -70,7 +69,7 @@ function pause_effects(effects, controlled_anchor, callback = noop) {
7069
for (var i = 0; i < length; i++) {
7170
destroy_effect(effects[i]);
7271
}
73-
callback();
72+
if (callback !== null) callback();
7473
});
7574
}
7675

0 commit comments

Comments
 (0)