From e1ee33ba7c2f48363cb3b487137d25a2459c4857 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 30 Jun 2022 20:17:16 +0100 Subject: [PATCH] LibJS: Fix incorrect ErrorType in Temporal.PlainMonthDay constructor --- .../LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp index dc2501246a..2011c54558 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayConstructor.cpp @@ -76,7 +76,7 @@ ThrowCompletionOr PlainMonthDayConstructor::construct(FunctionObject& n // This does not change the exposed behavior as the call to CreateTemporalMonthDay will immediately check that these values are valid // ISO values (for years: -273975 - 273975, for months: 1 - 12, for days: 1 - 31) all of which are subsets of this check. if (!AK::is_within_range(ref) || !AK::is_within_range(m) || !AK::is_within_range(d)) - return vm.throw_completion(global_object, ErrorType::TemporalInvalidPlainYearMonth); + return vm.throw_completion(global_object, ErrorType::TemporalInvalidPlainMonthDay); // 7. Return ? CreateTemporalMonthDay(m, d, calendar, ref, NewTarget). return TRY(create_temporal_month_day(global_object, m, d, *calendar, ref, &new_target));