diff --git a/runtime/JavaScript/src/antlr4/error/ErrorStrategy.js b/runtime/JavaScript/src/antlr4/error/ErrorStrategy.js index 44a161014..3da80f28b 100644 --- a/runtime/JavaScript/src/antlr4/error/ErrorStrategy.js +++ b/runtime/JavaScript/src/antlr4/error/ErrorStrategy.js @@ -227,7 +227,7 @@ class DefaultErrorStrategy extends ErrorStrategy { this.nextTokenState = ATNState.INVALID_STATE_NUMBER; return; } else if (nextTokens.contains(Token.EPSILON)) { - if(self.nextTokensContext === null) { + if(this.nextTokensContext === null) { // It's possible the next token won't match information tracked // by sync is restricted for performance. this.nextTokensContext = recognizer._ctx;