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

LibJS: Assume options is an object in the MergeLargestUnitOption AO

This is an editorial change in the Temporal spec.

See: 20a04ac
This commit is contained in:
Linus Groh 2022-06-15 00:47:40 +01:00
parent 569c2dc1d0
commit 52a4ee563d
6 changed files with 13 additions and 17 deletions

View file

@ -323,7 +323,7 @@ ThrowCompletionOr<Duration*> difference_temporal_plain_year_month(GlobalObject&
auto* this_date = TRY(calendar_date_from_fields(global_object, calendar, *this_fields));
// 22. Let untilOptions be ? MergeLargestUnitOption(options, largestUnit).
auto* until_options = TRY(merge_largest_unit_option(global_object, options, *largest_unit));
auto* until_options = TRY(merge_largest_unit_option(global_object, *options, *largest_unit));
// 23. Let result be ? CalendarDateUntil(calendar, thisDate, otherDate, untilOptions).
auto* duration = TRY(calendar_date_until(global_object, calendar, this_date, other_date, *until_options));