1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibJS: Convert to_integer_or_infinity() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-18 19:19:57 +01:00
parent ffee3890a7
commit be28a6142b
16 changed files with 100 additions and 237 deletions

View file

@ -89,7 +89,7 @@ String JSONObject::stringify_impl(GlobalObject& global_object, Value value, Valu
}
if (space.is_number()) {
auto space_mv = space.to_integer_or_infinity(global_object);
auto space_mv = MUST(space.to_integer_or_infinity(global_object));
space_mv = min(10, space_mv);
state.gap = space_mv < 1 ? String::empty() : String::repeated(' ', space_mv);
} else if (space.is_string()) {