Skip to content

Commit

Permalink
fix: Intl RangeError exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sirineJ committed Oct 7, 2024
1 parent 41c18ce commit 89d95fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function mapCountryCodeOptions(
const displayName = new Intl.DisplayNames(locale, { type: 'region' });
return countryCodeOptions
.map(({ code, country }) => {
const countryName = displayName.of(country);
const countryName = country ? displayName.of(country) : country;
return {
label: countryName ? `${countryName} (${code})` : code,
value: code,
Expand Down

0 comments on commit 89d95fb

Please sign in to comment.