mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
LibJS: Convert to_integer_or_infinity() to ThrowCompletionOr
This commit is contained in:
parent
ffee3890a7
commit
be28a6142b
16 changed files with 100 additions and 237 deletions
|
@ -711,7 +711,7 @@ ThrowCompletionOr<double> resolve_iso_month(GlobalObject& global_object, Object
|
|||
auto number_part = month_code_string.substring(1);
|
||||
|
||||
// 8. Set numberPart to ! ToIntegerOrInfinity(numberPart).
|
||||
auto number_part_integer = Value(js_string(vm, move(number_part))).to_integer_or_infinity(global_object);
|
||||
auto number_part_integer = MUST(Value(js_string(vm, move(number_part))).to_integer_or_infinity(global_object));
|
||||
|
||||
// 9. If numberPart < 1 or numberPart > 12, throw a RangeError exception.
|
||||
if (number_part_integer < 1 || number_part_integer > 12)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue