mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Adding registered_country fallback to getCountry
This commit is contained in:
parent
689bb94898
commit
6b3eb7617d
1 changed files with 2 additions and 1 deletions
|
|
@ -73,7 +73,8 @@ export async function getCountry(req, ip) {
|
|||
|
||||
const result = lookup.get(ip);
|
||||
|
||||
return result?.country?.iso_code;
|
||||
// country can not be set, fallback to registerd_country in this case
|
||||
return result?.country?.iso_code ?? result?.registered_country?.iso_code;
|
||||
}
|
||||
|
||||
export async function getClientInfo(req, { screen }) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue