Skip to content

Commit 95b76c7

Browse files
committed
fix: ensure tracking returns true, even if in unowned
1 parent f7a47d5 commit 95b76c7

File tree

1 file changed

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

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,7 @@ function create_effect(type, fn, sync, push = true) {
164164
* @returns {boolean}
165165
*/
166166
export function effect_tracking() {
167-
if (active_reaction === null || untracking) {
168-
return false;
169-
}
170-
171-
// If it's skipped, that's because we're inside an unowned
172-
// that is not being tracked by another reaction
173-
return true;
167+
return active_reaction !== null && !untracking;
174168
}
175169

176170
/**

0 commit comments

Comments
 (0)