Open waitingcheung opened 7 years ago
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).
if (this.yy.parser)
to if (this.yy && this.yy.parser)
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.jsto if (this.yy && this.yy.parser)
.