mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:57:34 +00:00
LibJS: Convert get_number_option() to ThrowCompletionOr
This commit is contained in:
parent
6d3de03549
commit
407cf04884
3 changed files with 8 additions and 7 deletions
|
@ -249,9 +249,10 @@ void set_number_format_digit_options(GlobalObject& global_object, NumberFormat&
|
|||
// 4. Assert: Type(mxfdDefault) is Number.
|
||||
|
||||
// 5. Let mnid be ? GetNumberOption(options, "minimumIntegerDigits,", 1, 21, 1).
|
||||
auto min_integer_digits = get_number_option(global_object, options, vm.names.minimumIntegerDigits, 1, 21, 1);
|
||||
if (vm.exception())
|
||||
auto min_integer_digits_or_error = get_number_option(global_object, options, vm.names.minimumIntegerDigits, 1, 21, 1);
|
||||
if (min_integer_digits_or_error.is_error())
|
||||
return;
|
||||
auto min_integer_digits = min_integer_digits_or_error.release_value();
|
||||
|
||||
// 6. Let mnfd be ? Get(options, "minimumFractionDigits").
|
||||
auto min_fraction_digits = options.get(vm.names.minimumFractionDigits);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue