mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
optional chaining
This commit is contained in:
parent
0fff40f912
commit
1f1ba6bcfd
|
@ -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 !== "/") {
|
||||
|
|
Loading…
Reference in a new issue