1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibJS: Convert coerce_options_to_object() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-18 19:33:45 +03:00
parent d0e5fc4576
commit b9c7a629f8
4 changed files with 11 additions and 12 deletions

View file

@ -360,9 +360,7 @@ NumberFormat* initialize_number_format(GlobalObject& global_object, NumberFormat
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales_value));
// 2. Set options to ? CoerceOptionsToObject(options).
auto* options = coerce_options_to_object(global_object, options_value);
if (vm.exception())
return {};
auto* options = TRY_OR_DISCARD(coerce_options_to_object(global_object, options_value));
// 3. Let opt be a new Record.
LocaleOptions opt {};