mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibJS: Make PrimitiveString::utf8_string() infallible
Work towards #20449.
This commit is contained in:
parent
7849950383
commit
c084269e5f
29 changed files with 79 additions and 93 deletions
|
@ -94,7 +94,7 @@ ThrowCompletionOr<PluralRules*> initialize_plural_rules(VM& vm, PluralRules& plu
|
|||
auto type = TRY(get_option(vm, *options, vm.names.type, OptionType::String, AK::Array { "cardinal"sv, "ordinal"sv }, "cardinal"sv));
|
||||
|
||||
// 7. Set pluralRules.[[Type]] to t.
|
||||
plural_rules.set_type(TRY(type.as_string().utf8_string_view()));
|
||||
plural_rules.set_type(type.as_string().utf8_string_view());
|
||||
|
||||
// 8. Perform ? SetNumberFormatDigitOptions(pluralRules, options, +0𝔽, 3𝔽, "standard").
|
||||
TRY(set_number_format_digit_options(vm, plural_rules, *options, 0, 3, NumberFormat::Notation::Standard));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue