summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quickjs.c b/quickjs.c
index b9c0152..ac4f2aa 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -35353,7 +35353,7 @@ static __exception int js_parse_function_decl2(JSParseState *s,
push_scope(s); /* enter body scope */
fd->body_scope = fd->scope_level;
- if (s->token.val == TOK_ARROW) {
+ if (s->token.val == TOK_ARROW && func_type == JS_PARSE_FUNC_ARROW) {
if (next_token(s))
goto fail;