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

LibJS: Fix Object.getOwnPropertyDescriptor() attributes for numeric property

We were getting the attributes of the existing value and then
immediately assigned the default attributes instead.
This commit is contained in:
Linus Groh 2021-04-20 18:42:10 +02:00
parent 09f8d52b00
commit 614bad86bc
2 changed files with 11 additions and 3 deletions

View file

@ -387,7 +387,6 @@ Optional<PropertyDescriptor> Object::get_own_property_descriptor(const PropertyN
return {};
value = existing_value.value().value;
attributes = existing_value.value().attributes;
attributes = default_attributes;
} else {
auto metadata = shape().lookup(property_name.to_string_or_symbol());
if (!metadata.has_value())