Skip to content

Commit

Permalink
tune
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm committed Dec 18, 2024
1 parent 823f7ff commit 0767c32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/svelte/src/internal/client/reactivity/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ export function effect_tracking() {
* @returns {boolean}
*/
export function effect_active() {
return active_effect !== null;
if (is_destroying_effect) {
return false;
}
return (
active_effect !== null || (active_reaction !== null && (active_reaction.f & UNOWNED) === 0)
);
}

/**
Expand Down

0 comments on commit 0767c32

Please sign in to comment.