From 13f2eeaffe118a4b8d19498947034fe117c0c25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Zakrzewski?= Date: Wed, 10 Apr 2024 13:56:26 +0200 Subject: [PATCH] Update return values of the functions for countries --- .../curator-service/ui/src/components/util/countryNames.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/verification/curator-service/ui/src/components/util/countryNames.tsx b/verification/curator-service/ui/src/components/util/countryNames.tsx index 66cbe02b9..ad955f7b7 100644 --- a/verification/curator-service/ui/src/components/util/countryNames.tsx +++ b/verification/curator-service/ui/src/components/util/countryNames.tsx @@ -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<{