Fixed formatRegion method. Closes #3344

This commit is contained in:
Mike Cao committed 2025-04-21 22:07:38 -07:00
1 parent 337a5b6e33
commit 8d3aad8454
3 files changed
+23 -23

No files matched your search

+2 -2
View File
@@ -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;
};