mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibJS: Convert canonicalize_locale_list() to ThrowCompletionOr
This commit is contained in:
parent
5426901521
commit
3758e65293
8 changed files with 27 additions and 42 deletions
|
@ -357,9 +357,7 @@ NumberFormat* initialize_number_format(GlobalObject& global_object, NumberFormat
|
|||
auto& vm = global_object.vm();
|
||||
|
||||
// 1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = canonicalize_locale_list(global_object, locales_value);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue