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
commit 614bad86bc
Notes: sideshowbarker 2024-07-18 19:19:54 +09:00
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())