Pass upper case country codes to i18n-iso-countries

Related to #5697.
This commit is contained in:
Tim Ruffing 2020-04-06 10:57:58 +02:00 committed by Дамян Минков
parent 47cffeb00a
commit b8963629bf
1 changed files with 3 additions and 1 deletions

View File

@ -63,8 +63,10 @@ class NumbersList extends Component<Props> {
hasFlags = true;
numbers = numbersMapping.reduce(
(resultNumbers, number) => {
// The i18n-iso-countries package insists on upper case.
const countryCode = number.countryCode.toUpperCase();
const countryName
= t(`countries:countries.${number.countryCode}`);
= t(`countries:countries.${countryCode}`);
if (resultNumbers[countryName]) {
resultNumbers[countryName].push(number);