Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 8b6702c

Browse files
committed
Fixed wired 'super' issue
1 parent 97451c6 commit 8b6702c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/computed/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export class Computed<ComputedValueType = any> extends State<ComputedValueType>
2626
}
2727

2828
public get value(): ComputedValueType {
29-
return super.value;
29+
// Note can't use 'super.value' because of 'https://github.com/Microsoft/TypeScript/issues/338'
30+
31+
// Add state to foundState (for auto tracking used states in computed functions)
32+
if (this.agileInstance().runtime.trackState)
33+
this.agileInstance().runtime.foundStates.add(this);
34+
35+
return this._value;
3036
}
3137

3238

0 commit comments

Comments
 (0)