optional chaining

This commit is contained in:
Miodec 2022-09-23 20:05:49 +02:00
parent 0fff40f912
commit 1f1ba6bcfd

View file

@ -216,7 +216,7 @@ export function recordRequestCountry(
country: string,
req: MonkeyTypes.Request
): void {
const reqPath = req.baseUrl + req.route.path;
const reqPath = req.baseUrl + req?.route?.path ?? "";
let normalizedPath = "/";
if (reqPath !== "/") {