Skip to content

Commit

Permalink
Update return values of the functions for countries
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw-zakrzewski committed Apr 10, 2024
1 parent 244a601 commit 13f2eea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export function nameCountry(isoCode: string, country?: string): string {
countryName = countries.getName(country, 'en', { select: 'official' });
}

return countryName;
return countryName || '';
}

export function codeForCountry(name: string): string {
return countries.getAlpha3Code(name, 'en');
return countries.getAlpha3Code(name, 'en') || '';
}

export function allCountryNames(): LocalizedCountryNames<{
Expand Down

0 comments on commit 13f2eea

Please sign in to comment.