mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
Notes:
sideshowbarker
2024-07-19 08:07:05 +09:00
Author: https://github.com/awesomekling
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