jison icon indicating copy to clipboard operation
jison copied to clipboard

TypeError: undefined is not an object (evaluating 'this.yy.parser')

Open waitingcheung opened this issue 7 years ago • 0 comments

I am using handlebars.js, which uses the lexer of jison in the source code. I found out that an invalid template can crash the library at the lexer generated by jison.

The following JSFiddle reproduces the error.

To fix the bug, you may change the if condition if (this.yy.parser) at line 1988 of handlebars.js to if (this.yy && this.yy.parser).

waitingcheung avatar Aug 17 '17 10:08 waitingcheung