Skip to content

Commit 8cc292f

Browse files
committed
remove deopt
1 parent df0b094 commit 8cc292f

File tree

1 file changed

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

1 file changed

+3
-4
lines changed

packages/svelte/src/internal/client/reactivity/effects.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
IS_ELSEIF
2828
} from '../constants.js';
2929
import { set } from './sources.js';
30-
import { noop } from '../../shared/utils.js';
3130
import { remove } from '../dom/reconciler.js';
3231

3332
/**
@@ -295,17 +294,17 @@ export function destroy_effect(effect) {
295294
* completed, and if the state change is reversed then we _resume_ it.
296295
* A paused effect does not update, and the DOM subtree becomes inert.
297296
* @param {import('#client').Effect} effect
298-
* @param {() => void} callback
297+
* @param {() => void} [callback]
299298
*/
300-
export function pause_effect(effect, callback = noop) {
299+
export function pause_effect(effect, callback) {
301300
/** @type {import('#client').TransitionManager[]} */
302301
var transitions = [];
303302

304303
pause_children(effect, transitions, true);
305304

306305
out(transitions, () => {
307306
destroy_effect(effect);
308-
callback();
307+
if (callback) callback();
309308
});
310309
}
311310

0 commit comments

Comments
 (0)