Skip to content

Commit

Permalink
fix: track only current observers on each run
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Nov 26, 2022
1 parent d609fef commit 1f1d818
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/observables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export function computed<T, R = never>(
$computed[DISPOSAL].clear();
}

$computed[OBSERVING]?.clear();
$computed[CONTEXT]?.[ERROR]?.clear();

const nextValue = compute($computed, fn, $computed);
Expand Down

0 comments on commit 1f1d818

Please sign in to comment.