mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibJS: Make FunctionDeclaration return undefined
FunctionExpression returns a JS::Function, while FunctionDeclaration declares one in the relevant scope.
This commit is contained in:
parent
6e6495fdf9
commit
ad6ede7ee4
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ Value FunctionDeclaration::execute(Interpreter& interpreter) const
|
|||
{
|
||||
auto* function = interpreter.heap().allocate<ScriptFunction>(body(), parameters());
|
||||
interpreter.set_variable(name(), function);
|
||||
return function;
|
||||
return {};
|
||||
}
|
||||
|
||||
Value FunctionExpression::execute(Interpreter& interpreter) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue