mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibJS: Convert to_primitive_string() to ThrowCompletionOr
This commit is contained in:
parent
da59c77fe3
commit
96ab116f0d
8 changed files with 18 additions and 30 deletions
|
@ -873,7 +873,7 @@ Value canonical_numeric_index_string(GlobalObject& global_object, PropertyName c
|
|||
auto n = argument.to_number(global_object);
|
||||
|
||||
// 4. If SameValue(! ToString(n), argument) is false, return undefined.
|
||||
if (!same_value(n.to_primitive_string(global_object), argument))
|
||||
if (!same_value(MUST(n.to_primitive_string(global_object)), argument))
|
||||
return js_undefined();
|
||||
|
||||
// 5. Return n.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue