1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibJS: Return the last value from a with statement

This commit is contained in:
Idan Horowitz 2021-06-08 03:58:23 +03:00 committed by Linus Groh
parent 73084835da
commit 98897ff676

View file

@ -302,8 +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);
interpreter.execute_statement(global_object, m_body);
return {};
return interpreter.execute_statement(global_object, m_body);
}
Value WhileStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const