1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibJS: Fix Promise.length attributes

This was missing an 'Attribute::Configurable' and falling back to the
default attributes.
This commit is contained in:
Linus Groh 2021-06-13 01:01:27 +01:00
parent a40e5b579a
commit 4794e6b0da

View file

@ -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.