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

LibJS: Port trivial use cases in the Intl namespace to String

This commit is contained in:
Timothy Flynn 2023-01-15 10:31:39 -05:00 committed by Linus Groh
parent edfdade9e9
commit fc413711ee
18 changed files with 72 additions and 70 deletions

View file

@ -276,7 +276,7 @@ ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, Depreca
// 2. Let displayDefault be "always".
auto display_default = "always"sv;
DeprecatedString style;
StringView style;
// 3. If style is undefined, then
if (style_value.is_undefined()) {
@ -308,7 +308,7 @@ ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM& vm, Depreca
}
}
} else {
style = TRY(style_value.as_string().deprecated_string());
style = TRY(style_value.as_string().utf8_string_view());
}
// 4. Let displayField be the string-concatenation of unit and "Display".