1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibJS: Convert parse_temporal_calendar_string() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-16 17:50:23 +01:00
parent 4f487266b4
commit 2e28f0b371
3 changed files with 6 additions and 10 deletions

View file

@ -378,10 +378,7 @@ Object* to_temporal_calendar(GlobalObject& global_object, Value temporal_calenda
// 3. If ! IsBuiltinCalendar(identifier) is false, then
if (!is_builtin_calendar(identifier)) {
// a. Let identifier be ? ParseTemporalCalendarString(identifier).
auto parsed_identifier = parse_temporal_calendar_string(global_object, identifier);
if (vm.exception())
return {};
identifier = move(*parsed_identifier);
identifier = TRY_OR_DISCARD(parse_temporal_calendar_string(global_object, identifier));
}
// 4. Return ! CreateTemporalCalendar(identifier).