Skip to content

Commit

Permalink
fix: ensure Svelte action destroy effects are untracked (#11562)
Browse files Browse the repository at this point in the history
* fix: unesure Svelte action destroy effects are untracked

* fix: unesure Svelte action destroy effects are untracked
  • Loading branch information
trueadm committed May 11, 2024
1 parent 816335f commit e49f1f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lazy-bats-turn.md
@@ -0,0 +1,5 @@
---
"svelte": patch
---

fix: ensure Svelte action destroy effects are untracked
Expand Up @@ -32,7 +32,7 @@ export function action(dom, action, get_value) {
}

if (payload?.destroy) {
return () => /** @type {Function} */ (payload.destroy)();
return () => untrack(() => /** @type {Function} */ (payload.destroy)());
}
});
}

0 comments on commit e49f1f7

Please sign in to comment.