From 4c544361fd69ab799a27fbd70e24534b51f70ea7 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 25 Apr 2023 16:51:42 -0700 Subject: [PATCH] Fixed vercel again. --- lib/detect.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/detect.ts b/lib/detect.ts index 868d0a80..0d0614b1 100644 --- a/lib/detect.ts +++ b/lib/detect.ts @@ -69,8 +69,7 @@ export async function getLocation(ip, req) { return { country, - // Vercel documentation says they return only region, but that is not always the case - subdivision1: region.includes('-') ? region : `${country}-${region}`, + subdivision1: region, city: decodeURIComponent(city), }; }