Use alpha2 for country label (#3067)

This commit is contained in:
WithoutPants 2022-11-03 09:04:48 +11:00 committed by GitHub
parent 270bc317cb
commit f25881a3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ interface IProps {
const CountryLabel: React.FC<IProps> = ({ 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 (
<div>