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
Notes:
sideshowbarker
2024-07-18 12:13:56 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/ba807c2d44c Pull-request: https://github.com/SerenityOS/serenity/pull/8060 Reviewed-by: https://github.com/linusg
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
Reference in a new issue