mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 21:59:11 +00:00
LibJS: Fix logic error in RegulateISODate
This commit is contained in:
parent
b9ab7a5095
commit
573587b83a
Notes:
sideshowbarker
2024-07-18 05:20:39 +09:00
Author: https://github.com/linusg
Commit: 573587b83a
Pull-request: https://github.com/SerenityOS/serenity/pull/9578
Reviewed-by: https://github.com/IdanHo
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 m = static_cast<u8>(month);
|
||||||
auto d = static_cast<u8>(day);
|
auto d = static_cast<u8>(day);
|
||||||
// a. If ! IsValidISODate(year, month, day) is false, throw a RangeError exception.
|
// 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);
|
vm.throw_exception<RangeError>(global_object, ErrorType::TemporalInvalidPlainDate);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue