mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
LibJS: Use ToPropertyKey in Object.getOwnPropertyDescriptor
The specification requires this. (And the current usage of PropertyName::from_value is invalid since integers are not allowed in this context)
This commit is contained in:
parent
1c51edb639
commit
f9395efaac
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::get_own_property_descriptor)
|
|||
auto* object = vm.argument(0).to_object(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto property_key = PropertyName::from_value(global_object, vm.argument(1));
|
||||
auto property_key = vm.argument(1).to_property_key(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
return object->get_own_property_descriptor_object(property_key);
|
||||
|
|
Loading…
Add table
Reference in a new issue