Преглед изворни кода

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())
     : NativeFunction("Object", *interpreter().global_object().function_prototype())
 {
 {
     put("prototype", interpreter().global_object().object_prototype(), 0);
     put("prototype", interpreter().global_object().object_prototype(), 0);
+    put("length", Value(1), Attribute::Configurable);
 
 
     u8 attr = Attribute::Writable | Attribute::Configurable;
     u8 attr = Attribute::Writable | Attribute::Configurable;
     put_native_function("defineProperty", define_property, 3, attr);
     put_native_function("defineProperty", define_property, 3, attr);