summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/AST.cpp')
-rw-r--r--Userland/Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index 8ce026096b..3a036cf6a7 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -302,7 +302,7 @@ Value WithStatement::execute(Interpreter& interpreter, GlobalObject& global_obje
auto* with_scope = interpreter.heap().allocate<WithScope>(global_object, *object, interpreter.vm().call_frame().scope);
TemporaryChange<ScopeObject*> scope_change(interpreter.vm().call_frame().scope, with_scope);
- return interpreter.execute_statement(global_object, m_body);
+ return interpreter.execute_statement(global_object, m_body).value_or(js_undefined());
}
Value WhileStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const