Skip to content

Commit

Permalink
fix(computed): fix #12033
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchangtao committed Sep 26, 2024
1 parent 1e7c3ed commit e448364
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/reactivity/src/computed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ export class ComputedRefImpl<T = any> implements Subscriber {
notify(): true | void {
this.flags |= EffectFlags.DIRTY
if (
!(this.flags & EffectFlags.NOTIFIED) &&
// avoid infinite self recursion
activeSub !== this
) {
if (!(this.flags & EffectFlags.NOTIFIED)) {
return true
}
batch(this)
return true
} else if (__DEV__) {
// TODO warn
}
Expand Down

0 comments on commit e448364

Please sign in to comment.