Skip to content

Commit

Permalink
check offset size
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiriac committed Jan 19, 2017
1 parent c96c775 commit db5f6a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Lexer.prototype.next = function () {
}
if (ch === ':') {
ch = '=>'; // alias
} else if (ch === '=' && this._input[this.offset] === '>') {
} else if (ch === '=' && this.offset < this._input.length && this._input[this.offset] === '>') {
ch += this.input();
}
return ch;
Expand Down

0 comments on commit db5f6a2

Please sign in to comment.