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

LibJS: Change LargerOfTwoTemporalUnits AO to return a StringView

This commit is contained in:
Timothy Flynn 2021-11-29 18:59:07 -05:00 committed by Linus Groh
parent 2cea4ad508
commit 1039159a6c
7 changed files with 9 additions and 9 deletions

View file

@ -992,7 +992,7 @@ ThrowCompletionOr<TemporalDuration> add_duration(GlobalObject& global_object, do
auto* difference_options = Object::create(global_object, nullptr);
// k. Perform ! CreateDataPropertyOrThrow(differenceOptions, "largestUnit", dateLargestUnit).
MUST(difference_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, move(date_largest_unit))));
MUST(difference_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, date_largest_unit)));
// l. Let dateDifference be ? CalendarDateUntil(calendar, relativeTo, end, differenceOptions).
auto* date_difference = TRY(calendar_date_until(global_object, calendar, &relative_to, end, *difference_options));