aboutsummaryrefslogtreecommitdiff
path: root/src/njs_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/njs_parser.c')
-rw-r--r--src/njs_parser.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/njs_parser.c b/src/njs_parser.c
index 6c093c77..5a26a84a 100644
--- a/src/njs_parser.c
+++ b/src/njs_parser.c
@@ -5908,12 +5908,10 @@ njs_parser_for_var_binding_or_var_list(njs_parser_t *parser,
njs_lexer_consume_token(parser->lexer, 2);
return NJS_DONE;
- }
-
- parser->node = NULL;
- njs_parser_next(parser, njs_parser_expression);
- return NJS_OK;
+ } else {
+ return njs_parser_failed(parser);
+ }
}
}