Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed city showing undefined.

Mike Caof450fc35fb8b
diff --git a/lib/detect.ts b/lib/detect.ts
index 0d0614b1d..2597739bb 100644
--- a/lib/detect.ts
+++ b/lib/detect.ts
@@ -70,7 +70,7 @@ export async function getLocation(ip, req) {
return {
country,
subdivision1: region,
- city: decodeURIComponent(city),
+ city: city ? decodeURIComponent(city) : undefined,
};
}