Skip to content

armgit / umami

Public Imported from GitHub
0

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.

Fixed formatRegion method. Closes #3344

Mike Cao8d3aad845418
diff --git a/package.json b/package.json
index e8c674014..059a0b432 100644
--- a/package.json
+++ b/package.json
@@ -79,7 +79,7 @@
"@umami/redis-client": "^0.26.0",
"bcryptjs": "^2.4.3",
"chalk": "^4.1.1",
- "chart.js": "^4.4.2",
+ "chart.js": "^4.4.9",
"chartjs-adapter-date-fns": "^3.0.0",
"classnames": "^2.3.1",
"colord": "^2.9.2",
@@ -121,12 +121,12 @@
"serialize-error": "^12.0.0",
"thenby": "^1.3.4",
"uuid": "^9.0.0",
- "zod": "^3.24.1",
+ "zod": "^3.24.3",
"zustand": "^4.5.5"
},
"devDependencies": {
"@formatjs/cli": "^4.2.29",
- "@netlify/plugin-nextjs": "^5.8.1",
+ "@netlify/plugin-nextjs": "^5.10.6",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-json": "^6.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9eb88425d..69cbbfcda 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -51,11 +51,11 @@ importers:
specifier: ^4.1.1
version: 4.1.2
chart.js:
- specifier: ^4.4.2
- version: 4.4.8
+ specifier: ^4.4.9
+ version: 4.4.9
chartjs-adapter-date-fns:
specifier: ^3.0.0
classnames:
specifier: ^2.3.1
version: 2.5.1
@@ -177,8 +177,8 @@ importers:
specifier: ^9.0.0
version: 9.0.1
zod:
- specifier: ^3.24.1
- version: 3.24.2
+ specifier: ^3.24.3
+ version: 3.24.3
zustand:
specifier: ^4.5.5
@@ -187,8 +187,8 @@ importers:
specifier: ^4.2.29
'@netlify/plugin-nextjs':
- specifier: ^5.8.1
- version: 5.10.5
+ specifier: ^5.10.6
+ version: 5.10.6
'@rollup/plugin-alias':
specifier: ^5.0.0
version: 5.1.1([email protected])
@@ -1800,8 +1800,8 @@ packages:
'@napi-rs/[email protected]':
resolution: {integrity: sha512-OBlgKdX7gin7OIq4fadsjpg+cp2ZphvAIKucHsNfTdJiqdOmOEwQd/bHi0VwNrcw5xpBJyUw6cK/QilCqy1BSg==}
- '@netlify/[email protected]':
- resolution: {integrity: sha512-4Lw6fy4VMroBGcrdwjhWfnejmeqbTRgqhQKYIBT0AejzPv4HzxLndtSjqcgZp8gXQ7biEfJvk26cXW6rFnM+dw==}
+ '@netlify/[email protected]':
+ resolution: {integrity: sha512-j/Jt/MMFy70f1LIa6qkviNWVoEIoF9ZICdDC3TF/IvStxWHGAYHm8pkqqbi1VqzjUEDUNu1ZGjo+VElZyenRBg==}
engines: {node: '>=18.0.0'}
@@ -2834,8 +2834,8 @@ packages:
resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==}
- resolution: {integrity: sha512-IkGZlVpXP+83QpMm4uxEiGqSI7jFizwVtF3+n5Pc3k7sMO+tkd0qxh2OzLhenM0K80xtmAONWGBn082EiBQSDA==}
+ resolution: {integrity: sha512-EyZ9wWKgpAU0fLJ43YAEIF8sr5F2W3LqbS40ZJyHIner2lY14ufqv2VMp69MAiZ2rpwxEUxEhIH/0U3xyRynxg==}
engines: {pnpm: '>=8'}
@@ -6684,8 +6684,8 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
+ resolution: {integrity: sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==}
resolution: {integrity: sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==}
@@ -8355,7 +8355,7 @@ snapshots:
'@tybys/wasm-util': 0.9.0
optional: true
- '@netlify/[email protected]': {}
+ '@netlify/[email protected]': {}
'@next/[email protected]': {}
@@ -9487,13 +9487,13 @@ snapshots:
dependencies:
'@kurkle/color': 0.3.4
dependencies:
- chart.js: 4.4.8
+ chart.js: 4.4.9
date-fns: 2.30.0
@@ -13941,7 +13941,7 @@ snapshots:
dependencies:
diff --git a/src/components/hooks/useFormat.ts b/src/components/hooks/useFormat.ts
index 927e21e88..43cba374e 100644
--- a/src/components/hooks/useFormat.ts
+++ b/src/components/hooks/useFormat.ts
@@ -27,8 +27,8 @@ export function useFormat() {
return countryNames[value] || value;
};
- const formatRegion = (value: string): string => {
- const [country] = value.split('-');
+ const formatRegion = (value?: string): string => {
+ const [country] = value?.split('-') || [];
return regions[value] ? `${regions[value]}, ${countryNames[country]}` : value;
};