mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
fix null ip lookup error
This commit is contained in:
parent
275e7d3df6
commit
f569f6ac91
@ -79,10 +79,10 @@ export async function getClientInfo(req, { screen }) {
|
||||
const userAgent = req.headers['user-agent'];
|
||||
const ip = getIpAddress(req);
|
||||
const location = await getLocation(ip);
|
||||
const country = location.country;
|
||||
const subdivision1 = location.subdivision1;
|
||||
const subdivision2 = location.subdivision2;
|
||||
const city = location.city;
|
||||
const country = location?.country;
|
||||
const subdivision1 = location?.subdivision1;
|
||||
const subdivision2 = location?.subdivision2;
|
||||
const city = location?.city;
|
||||
const browser = browserName(userAgent);
|
||||
const os = detectOS(userAgent);
|
||||
const device = getDevice(screen, browser, os);
|
||||
|
Loading…
Reference in New Issue
Block a user