From e93fb3dd4490196857add622a9924491a3e3b8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Wed, 29 Nov 2023 13:21:03 +0100 Subject: [PATCH] linting --- src/libs/Navigation/NavigationRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/NavigationRoot.tsx b/src/libs/Navigation/NavigationRoot.tsx index 93cadc453736..cbb2e62161f3 100644 --- a/src/libs/Navigation/NavigationRoot.tsx +++ b/src/libs/Navigation/NavigationRoot.tsx @@ -105,7 +105,7 @@ function NavigationRoot({authenticated, onReady}: NavigationRootProps) { const backgroundColorFromRoute = currentRoute?.params && 'backgroundColor' in currentRoute.params && typeof currentRoute.params.backgroundColor === 'string' && currentRoute.params.backgroundColor; - const backgroundColorFallback = theme.PAGE_BACKGROUND_COLORS[currentRoute?.name!] || theme.appBG; + const backgroundColorFallback = currentRoute?.name ? theme.PAGE_BACKGROUND_COLORS[currentRoute.name] || theme.appBG : theme.appBG; // It's possible for backgroundColorFromRoute to be empty string, so we must use "||" to fallback to backgroundColorFallback. // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing