mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibJS: Move calendar validation out of parse_temporal_calendar_string
This is an editorial change in the Temporal spec.
See: 7207a1c
This commit is contained in:
parent
80dcddacea
commit
4f3c283f24
2 changed files with 6 additions and 8 deletions
|
@ -1262,13 +1262,7 @@ ThrowCompletionOr<String> parse_temporal_calendar_string(GlobalObject& global_ob
|
|||
return "iso8601"sv;
|
||||
}
|
||||
|
||||
// 5. If ! IsBuiltinCalendar(id) is false, then
|
||||
if (!is_builtin_calendar(*id_part)) {
|
||||
// a. Throw a RangeError exception.
|
||||
return vm.throw_completion<RangeError>(global_object, ErrorType::TemporalInvalidCalendarIdentifier, *id_part);
|
||||
}
|
||||
|
||||
// 6. Return id.
|
||||
// 5. Return id.
|
||||
return id_part.value();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue