Browse Source

LibJS: Set arguments_object_needed = false if scope_body == nullptr

For obvious reasons.
Linus Groh 3 years ago
parent
commit
fcb355f193
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp

+ 2 - 0
Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp

@@ -186,6 +186,8 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
                 return IterationDecision::Continue;
             });
         }
+    } else {
+        arguments_object_needed = false;
     }
 
     Environment* environment;