Skip to content

Commit abde966

Browse files
committed
Fixed wrong country lookup.
1 parent 97c687f commit abde966

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/detect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export async function getClientInfo(request: Request, payload: Record<string, an
148148
const userAgent = payload?.userAgent || request.headers.get('user-agent');
149149
const ip = payload?.ip || getIpAddress(request.headers);
150150
const location = await getLocation(ip, request.headers, !!payload?.ip);
151-
const country = payload?.userAgent || location?.country;
151+
const country = location?.country;
152152
const subdivision1 = location?.subdivision1;
153153
const subdivision2 = location?.subdivision2;
154154
const city = location?.city;

0 commit comments

Comments
 (0)