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 26fc3a4 commit 784958d
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 784958d

Please sign in to comment.