mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
add optional check for subdivision
This commit is contained in:
parent
69410f4a55
commit
50b4ac9889
@ -71,7 +71,7 @@ export async function getLocation(ip, req) {
|
||||
|
||||
return {
|
||||
country,
|
||||
subdivision1: subdivision1.includes('-') ? subdivision1 : `${country}-${subdivision1}`,
|
||||
subdivision1: subdivision1?.includes('-') ? subdivision1 : `${country}-${subdivision1}`,
|
||||
city,
|
||||
};
|
||||
}
|
||||
@ -84,7 +84,7 @@ export async function getLocation(ip, req) {
|
||||
|
||||
return {
|
||||
country,
|
||||
subdivision1: subdivision1.includes('-') ? subdivision1 : `${country}-${subdivision1}`,
|
||||
subdivision1: subdivision1?.includes('-') ? subdivision1 : `${country}-${subdivision1}`,
|
||||
city,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user