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:
Idan Horowitz 2021-06-15 12:46:35 +03:00 committed by Linus Groh
parent 9a0cbcc3d1
commit ba807c2d44
Notes: sideshowbarker 2024-07-18 12:13:56 +09:00

View file

@ -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