From d007e8d00f802fd57661e250f99ae95976f7bd13 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 2 May 2020 18:40:19 +0100 Subject: [PATCH] LibJS: Set correct "length" of Object constructor --- Libraries/LibJS/Runtime/ObjectConstructor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Libraries/LibJS/Runtime/ObjectConstructor.cpp index 5128bbbab6e..e3f96fe4b7b 100644 --- a/Libraries/LibJS/Runtime/ObjectConstructor.cpp +++ b/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);