فهرست منبع

LibJS: Set correct "length" of Object constructor

Linus Groh 5 سال پیش
والد
کامیت
d007e8d00f
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      Libraries/LibJS/Runtime/ObjectConstructor.cpp

+ 1 - 0
Libraries/LibJS/Runtime/ObjectConstructor.cpp

@@ -39,6 +39,7 @@ ObjectConstructor::ObjectConstructor()
     : NativeFunction("Object", *interpreter().global_object().function_prototype())
 {
     put("prototype", interpreter().global_object().object_prototype(), 0);
+    put("length", Value(1), Attribute::Configurable);
 
     u8 attr = Attribute::Writable | Attribute::Configurable;
     put_native_function("defineProperty", define_property, 3, attr);