Skip to content

Commit db13492

Browse files
committed
fix: unesure Svelte action destroy effects are untracked
1 parent 4cadd07 commit db13492

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/lazy-bats-turn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: unesure Svelte action destroy effects are untracked

packages/svelte/src/internal/client/dom/elements/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function action(dom, action, get_value) {
3232
}
3333

3434
if (payload?.destroy) {
35-
return () => /** @type {Function} */ (payload.destroy)();
35+
return () => untrack(() => /** @type {Function} */ (payload.destroy)());
3636
}
3737
});
3838
}

0 commit comments

Comments
 (0)