diff options
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp index 5343297d27..894524f20d 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.cpp +++ b/Userland/Libraries/LibJS/Runtime/VM.cpp @@ -164,7 +164,7 @@ void VM::set_variable(const FlyString& name, Value value, GlobalObject& global_o Value VM::get_variable(const FlyString& name, GlobalObject& global_object) { if (!m_call_stack.is_empty()) { - if (name == names.arguments && m_call_stack.size() > 1) { + if (name == names.arguments && !call_frame().callee.is_empty()) { // HACK: Special handling for the name "arguments": // If the name "arguments" is defined in the current scope, for example via // a function parameter, or by a local var declaration, we use that. |