Skip to content

Commit 0767c32

Browse files
committed
tune
1 parent 823f7ff commit 0767c32

File tree

1 file changed

+6
-1
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,12 @@ export function effect_tracking() {
178178
* @returns {boolean}
179179
*/
180180
export function effect_active() {
181-
return active_effect !== null;
181+
if (is_destroying_effect) {
182+
return false;
183+
}
184+
return (
185+
active_effect !== null || (active_reaction !== null && (active_reaction.f & UNOWNED) === 0)
186+
);
182187
}
183188

184189
/**

0 commit comments

Comments
 (0)