Skip to content

Commit ceb733c

Browse files
authored
chore: ensure we null effect fields (#13529)
1 parent 765ca03 commit ceb733c

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ export function destroy_effect(effect, remove_dom = true) {
407407
unlink_effect(effect);
408408
}
409409

410+
if (DEV) {
411+
effect.component_function = null;
412+
}
413+
410414
// `first` and `child` are nulled out in destroy_effect_children
411415
effect.next =
412416
effect.prev =

0 commit comments

Comments
 (0)