mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user