From 0d6ad46bf65a30254da2f082cf119f6a73acb292 Mon Sep 17 00:00:00 2001 From: Robin Tail Date: Thu, 14 Nov 2024 10:28:05 +0100 Subject: [PATCH] Ref: simpler implementation. --- src/server-helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server-helpers.ts b/src/server-helpers.ts index 45efaae68..d2ab71bfc 100644 --- a/src/server-helpers.ts +++ b/src/server-helpers.ts @@ -143,7 +143,7 @@ export const createLoggingMiddleware = export const makeGetLogger = (fallback: ActualLogger): GetLogger => (request) => - (request && (request as EquippedRequest).res?.locals[metaSymbol]?.logger) || + (request as EquippedRequest | undefined)?.res?.locals[metaSymbol]?.logger || fallback; export const installDeprecationListener = (logger: ActualLogger) =>