mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
LibJS: Fix two accidentally incorrect ScriptFunction constructions
The addition of an is_generator parameter broke this, as is_strict was being passed in, causing an assertion. This is being addressed by changing it to an enum in #7981, but in the meantime let's just fix these two cases.
This commit is contained in:
parent
f218a4b548
commit
17da54d49c
2 changed files with 2 additions and 2 deletions
|
@ -415,7 +415,7 @@ RefPtr<FunctionExpression> Parser::try_parse_arrow_function_expression(bool expe
|
|||
state_rollback_guard.disarm();
|
||||
discard_saved_state();
|
||||
auto body = function_body_result.release_nonnull();
|
||||
return create_ast_node<FunctionExpression>({ m_parser_state.m_current_token.filename(), rule_start.position(), position() }, "", move(body), move(parameters), function_length, m_parser_state.m_var_scopes.take_last(), is_strict, true);
|
||||
return create_ast_node<FunctionExpression>({ m_parser_state.m_current_token.filename(), rule_start.position(), position() }, "", move(body), move(parameters), function_length, m_parser_state.m_var_scopes.take_last(), false, is_strict, true);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue