Skip to content

Commit

Permalink
Fix throwing of parseError
Browse files Browse the repository at this point in the history
The constructor is set to `new Error()`, instead set it to just
`Error`.
  • Loading branch information
polybuildr committed Jan 17, 2016
1 parent 6551ede commit 4f76010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jison.js
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ function parseError (str, hash) {
this.message = msg;
this.hash = hash;
}
_parseError.prototype = new Error();
_parseError.prototype = Error;

throw new _parseError(str, hash);
}
Expand Down

0 comments on commit 4f76010

Please sign in to comment.