diff --git a/lib/detect.ts b/lib/detect.ts index 0d0614b1..2597739b 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, }; }