mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
LibJS: Fix incorrect ErrorType in Temporal.PlainMonthDay constructor
This commit is contained in:
parent
a999b82882
commit
e1ee33ba7c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
// 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.
|
// 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))
|
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).
|
// 7. Return ? CreateTemporalMonthDay(m, d, calendar, ref, NewTarget).
|
||||||
return TRY(create_temporal_month_day(global_object, m, d, *calendar, ref, &new_target));
|
return TRY(create_temporal_month_day(global_object, m, d, *calendar, ref, &new_target));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue