diff --git a/lib/parse.js b/lib/parse.js index 1a3895d9..25972af5 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1376,12 +1376,13 @@ function parse($TEXT, options) { next(); var yes = expression(false); expect(":"); + var alternative = expression(false, no_in); return new AST_Conditional({ start : start, condition : expr, consequent : yes, - alternative : expression(false, no_in), - end : peek() + alternative : alternative, + end : prev() }); } return expr;