mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibJS: Call toString on the key, not on the argument in ToPropertyKey
As required by the specification: https://tc39.es/ecma262/#sec-topropertykey
This commit is contained in:
parent
9a0cbcc3d1
commit
ba807c2d44
1 changed files with 1 additions and 1 deletions
|
@ -576,7 +576,7 @@ StringOrSymbol Value::to_property_key(GlobalObject& global_object) const
|
|||
return {};
|
||||
if (key.is_symbol())
|
||||
return &key.as_symbol();
|
||||
return to_string(global_object);
|
||||
return key.to_string(global_object);
|
||||
}
|
||||
|
||||
i32 Value::to_i32_slow_case(GlobalObject& global_object) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue