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

LibJS: Port Intl.DurationFormat to String

This commit is contained in:
Timothy Flynn 2023-01-27 15:57:43 -05:00 committed by Linus Groh
parent 4c8f7d76c4
commit 8dc4e05ecf
4 changed files with 14 additions and 14 deletions

View file

@ -99,7 +99,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> DurationFormatConstructor::construct(Fun
duration_format->set_data_locale(move(result.data_locale));
// 16. Let prevStyle be the empty String.
auto previous_style = DeprecatedString::empty();
String previous_style {};
// 17. For each row of Table 1, except the header row, in table order, do
for (auto const& duration_instances_component : duration_instances_components) {
@ -110,7 +110,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> DurationFormatConstructor::construct(Fun
auto display_slot = duration_instances_component.set_display_slot;
// c. Let unit be the Unit value.
auto unit = duration_instances_component.unit;
auto unit = TRY_OR_THROW_OOM(vm, String::from_utf8(duration_instances_component.unit));
// d. Let valueList be the Values value.
auto value_list = duration_instances_component.values;