Skip to content

Commit

Permalink
Guarantee that an autorun is not rerun if it is disposed (#188920)
Browse files Browse the repository at this point in the history
  • Loading branch information
hediet authored Jul 26, 2023
1 parent 0b58930 commit 96ebd36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/base/common/observableImpl/autorun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class AutorunObserver<TChangeSummary = any> implements IObserver, IReader
}

private _runIfNeeded() {
if (this.state === AutorunState.upToDate) {
if (this.state === AutorunState.upToDate || this.disposed) {
return;
}

Expand Down

0 comments on commit 96ebd36

Please sign in to comment.