File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import {
27
27
IS_ELSEIF
28
28
} from '../constants.js' ;
29
29
import { set } from './sources.js' ;
30
- import { noop } from '../../shared/utils.js' ;
31
30
import { remove } from '../dom/reconciler.js' ;
32
31
33
32
/**
@@ -295,17 +294,17 @@ export function destroy_effect(effect) {
295
294
* completed, and if the state change is reversed then we _resume_ it.
296
295
* A paused effect does not update, and the DOM subtree becomes inert.
297
296
* @param {import('#client').Effect } effect
298
- * @param {() => void } callback
297
+ * @param {() => void } [ callback]
299
298
*/
300
- export function pause_effect ( effect , callback = noop ) {
299
+ export function pause_effect ( effect , callback ) {
301
300
/** @type {import('#client').TransitionManager[] } */
302
301
var transitions = [ ] ;
303
302
304
303
pause_children ( effect , transitions , true ) ;
305
304
306
305
out ( transitions , ( ) => {
307
306
destroy_effect ( effect ) ;
308
- callback ( ) ;
307
+ if ( callback ) callback ( ) ;
309
308
} ) ;
310
309
}
311
310
You can’t perform that action at this time.
0 commit comments