mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-09 04:37:52 +03:00
LibJS: Fix incorrect ErrorType in Temporal.PlainMonthDay constructor
This commit is contained in:
parent
a999b82882
commit
e1ee33ba7c
Notes:
sideshowbarker
2024-07-17 09:48:27 +09:00
@ -76,7 +76,7 @@ ThrowCompletionOr<Object*> 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<i32>(ref) || !AK::is_within_range<u8>(m) || !AK::is_within_range<u8>(d))
|
||||
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidPlainYearMonth);
|
||||
return vm.throw_completion<RangeError>(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));
|
||||
|
Loading…
Reference in New Issue
Block a user