Skip to content

Commit

Permalink
fix: keep child computations alive on update
Browse files Browse the repository at this point in the history
ref #4
  • Loading branch information
mihar-22 committed Aug 5, 2022
1 parent ecaf3dc commit f4b1d2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/observables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export function computed<T>(
if (_observer) addObserver($computed, _observer);

if (!$computed[DISPOSED] && $computed[DIRTY]) {
forEachChild($computed, dispose);
forEachChild($computed, emptyDisposal);
emptyDisposal($computed);

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

0 comments on commit f4b1d2d

Please sign in to comment.