Skip to content

Commit

Permalink
add ruleStack comparison in TokenizerState.equals method
Browse files Browse the repository at this point in the history
  • Loading branch information
zikaari committed May 20, 2018
1 parent f3a7494 commit 82f0f38
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class TokenizerState implements monacoNsps.languages.IState {
}

public equals(other: monacoNsps.languages.IState): boolean {
if (other === this) {
return true;
}
if (!other || !(other instanceof TokenizerState)) {
if (!other ||
!(other instanceof TokenizerState) ||
other !== this ||
other._ruleStack !== this._ruleStack
) {
return false;
}
return true;
Expand Down

0 comments on commit 82f0f38

Please sign in to comment.