summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r--Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp
index d8af41531c..c451014084 100644
--- a/Libraries/LibJS/AST.cpp
+++ b/Libraries/LibJS/AST.cpp
@@ -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