From 1401bc1469b55d3ff9976fe2b6cb4f917faa6c3a Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Mon, 26 Feb 2024 13:12:21 +0100 Subject: [PATCH] Fix hasRouteMatchingPolicyID --- .../linkingConfig/getMatchingCentralPaneRouteForState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkingConfig/getMatchingCentralPaneRouteForState.ts b/src/libs/Navigation/linkingConfig/getMatchingCentralPaneRouteForState.ts index 02ad78a4c0447..2391d8d2149de 100644 --- a/src/libs/Navigation/linkingConfig/getMatchingCentralPaneRouteForState.ts +++ b/src/libs/Navigation/linkingConfig/getMatchingCentralPaneRouteForState.ts @@ -35,7 +35,7 @@ const getTopMostReportIDFromRHP = (state: State): string => { // Check if the given route has a policyID equal to the id provided in the function params function hasRouteMatchingPolicyID(route: NavigationPartialRoute, policyID?: string) { - if (!route.params) { + if (!route?.params) { return false; }