1
Fork 0
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:
Linus Groh 2021-10-12 18:05:46 +01:00
parent da59c77fe3
commit 96ab116f0d
8 changed files with 18 additions and 30 deletions

View file

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