mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
LibJS: Fix logic error in RegulateISODate
This commit is contained in:
parent
b9ab7a5095
commit
573587b83a
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ Optional<ISODate> regulate_iso_date(GlobalObject& global_object, double year, do
|
|||
auto m = static_cast<u8>(month);
|
||||
auto d = static_cast<u8>(day);
|
||||
// a. If ! IsValidISODate(year, month, day) is false, throw a RangeError exception.
|
||||
if (is_valid_iso_date(y, m, d)) {
|
||||
if (!is_valid_iso_date(y, m, d)) {
|
||||
vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainDate);
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue