Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Added fallback in case country code not found.
Mike Caob6f3f57455d9
diff --git a/components/metrics/CountriesTable.js b/components/metrics/CountriesTable.jsindex 6dfb91958..2d7b5ceb8 100644--- a/components/metrics/CountriesTable.js+++ b/components/metrics/CountriesTable.js@@ -17,7 +17,7 @@ export function CountriesTable({ websiteId, ...props }) {value={countryNames[code] && code}label={countryNames[code]}>- <img src={`/images/flags/${code.toLowerCase()}.png`} alt={code} />+ <img src={`/images/flags/${code?.toLowerCase() || 'xx'}.png`} alt={code} /></FilterLink>);}diff --git a/components/metrics/RegionsTable.js b/components/metrics/RegionsTable.jsindex 83296d97a..c8e0b7686 100644--- a/components/metrics/RegionsTable.js+++ b/components/metrics/RegionsTable.js@@ -18,7 +18,7 @@ export function RegionsTable({ websiteId, ...props }) {const renderLink = ({ x: code }) => {return (<FilterLink id="region" className={locale} value={code} label={renderLabel(code)}>- <img src={`/images/flags/${code.split('-')[0].toLowerCase()}.png`} alt={code} />+ <img src={`/images/flags/${code?.split('-')?.[0]?.toLowerCase() || 'xx'}.png`} alt={code} /></FilterLink>);};diff --git a/public/images/flags/xx.png b/public/images/flags/xx.pngnew file mode 100644index 000000000..520580267Binary files /dev/null and b/public/images/flags/xx.png differ