Skip to content

Commit

Permalink
refactor(effectScope): remove unneeded condition
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Oct 10, 2024
1 parent 349bf97 commit d6a0b4b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/effectScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ export class EffectScope implements IEffect, Subscriber {
versionOrDirtyLevel = DirtyLevels.NotDirty;

notify() {
const dirtyLevel = this.versionOrDirtyLevel;
if (dirtyLevel === DirtyLevels.MaybeDirty || dirtyLevel === DirtyLevels.Dirty) {
Subscriber.resolveMaybeDirty(this);
this.versionOrDirtyLevel = DirtyLevels.NotDirty;
}
Subscriber.resolveMaybeDirty(this);
this.versionOrDirtyLevel = DirtyLevels.NotDirty;
}

run<T>(fn: () => T) {
Expand Down

0 comments on commit d6a0b4b

Please sign in to comment.