From 93a20b3bfb23e122eccf817b733625d8599b6614 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 24 May 2022 18:23:35 +0100 Subject: [PATCH] LibJS: Use default argument of CalendarDateFromFields This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/7a4a518 --- Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp index e4330e9407..5fa5f0b553 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonth.cpp @@ -398,8 +398,8 @@ ThrowCompletionOr add_duration_to_or_subtract_duration_from_pla // 11. Perform ! CreateDataPropertyOrThrow(fields, "day", day). MUST(fields->create_data_property_or_throw(vm.names.day, Value(day))); - // 12. Let date be ? CalendarDateFromFields(calendar, fields, undefined). - auto* date = TRY(calendar_date_from_fields(global_object, calendar, *fields, nullptr)); + // 12. Let date be ? CalendarDateFromFields(calendar, fields). + auto* date = TRY(calendar_date_from_fields(global_object, calendar, *fields)); // 13. Let durationToAdd be ! CreateTemporalDuration(duration.[[Years]], duration.[[Months]], duration.[[Weeks]], balanceResult.[[Days]], 0, 0, 0, 0, 0, 0). auto* duration_to_add = MUST(create_temporal_duration(global_object, duration.years, duration.months, duration.weeks, balance_result.days, 0, 0, 0, 0, 0, 0));