mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibJS: Convert to_positive_integer() to ThrowCompletionOr
This commit is contained in:
parent
2f56fd48ca
commit
9ac426c906
3 changed files with 7 additions and 10 deletions
|
@ -157,7 +157,7 @@ double calendar_month(GlobalObject& global_object, Object& calendar, Object& dat
|
|||
}
|
||||
|
||||
// 4. Return ? ToPositiveInteger(result).
|
||||
return to_positive_integer(global_object, result);
|
||||
return TRY_OR_DISCARD(to_positive_integer(global_object, result));
|
||||
}
|
||||
|
||||
// 12.1.11 CalendarMonthCode ( calendar, dateLike ), https://tc39.es/proposal-temporal/#sec-temporal-calendarmonthcode
|
||||
|
@ -199,7 +199,7 @@ double calendar_day(GlobalObject& global_object, Object& calendar, Object& date_
|
|||
}
|
||||
|
||||
// 4. Return ? ToPositiveInteger(result).
|
||||
return to_positive_integer(global_object, result);
|
||||
return TRY_OR_DISCARD(to_positive_integer(global_object, result));
|
||||
}
|
||||
|
||||
// 12.1.13 CalendarDayOfWeek ( calendar, dateLike ), https://tc39.es/proposal-temporal/#sec-temporal-calendardayofweek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue