mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Fixed formatRegion method. Closes #3344
This commit is contained in:
parent
337a5b6e33
commit
8d3aad8454
3 changed files with 23 additions and 23 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue