Skip to content

Commit

Permalink
Polyfill: Align CalendarResolveFields with spec
Browse files Browse the repository at this point in the history
From CalendarResolveFields:

"The operation throws a *TypeError* exception if the properties of
_fields_ are internally inconsistent within the calendar or insufficient
to identify a unique instance of _type_ in the calendar."
  • Loading branch information
ptomato committed Oct 26, 2023
1 parent d894416 commit e5ea007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polyfill/lib/calendar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ const nonIsoHelperBase = {
}
if (this.hasEra) {
if ((calendarDate['era'] === undefined) !== (calendarDate['eraYear'] === undefined)) {
throw new RangeError("properties 'era' and 'eraYear' must be provided together");
throw new TypeError("properties 'era' and 'eraYear' must be provided together");
}
}
},
Expand Down

0 comments on commit e5ea007

Please sign in to comment.