浏览代码

LibJS: Set arguments_object_needed = false if scope_body == nullptr

For obvious reasons.
Linus Groh 3 年之前
父节点
当前提交
fcb355f193
共有 1 个文件被更改,包括 2 次插入0 次删除
  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;