浏览代码

LibJS: Fix Promise.length attributes

This was missing an 'Attribute::Configurable' and falling back to the
default attributes.
Linus Groh 4 年之前
父节点
当前提交
4794e6b0da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp

+ 1 - 1
Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp

@@ -27,7 +27,7 @@ void PromiseConstructor::initialize(GlobalObject& global_object)
     // 27.2.4.4 Promise.prototype, https://tc39.es/ecma262/#sec-promise.prototype
     define_property(vm.names.prototype, global_object.promise_prototype(), 0);
 
-    define_property(vm.names.length, Value(1));
+    define_property(vm.names.length, Value(1), Attribute::Configurable);
 
     u8 attr = Attribute::Writable | Attribute::Configurable;
     // TODO: Implement these functions below and uncomment this.