From f25881a3bfbe87fde0b4fa51fe693ae7a19c77de Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 3 Nov 2022 09:04:48 +1100 Subject: [PATCH] Use alpha2 for country label (#3067) --- ui/v2.5/src/components/Shared/CountryLabel.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Shared/CountryLabel.tsx b/ui/v2.5/src/components/Shared/CountryLabel.tsx index 3fb57e749..82c83bfc4 100644 --- a/ui/v2.5/src/components/Shared/CountryLabel.tsx +++ b/ui/v2.5/src/components/Shared/CountryLabel.tsx @@ -11,7 +11,9 @@ interface IProps { const CountryLabel: React.FC = ({ country, showFlag = true }) => { const { locale } = useIntl(); - const fromISO = getCountryByISO(country, locale); + // #3063 - use alpha2 values only + const fromISO = + country?.length === 2 ? getCountryByISO(country, locale) : undefined; return (