From b7f16800b53d3356522847691da3384142cccad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Thu, 9 May 2024 13:33:48 -0600 Subject: [PATCH] Check if the route has reportActionID in parseReportRouteParams --- src/libs/ReportUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 4318f3c4463e..07ef0ac4c8b0 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -5336,6 +5336,7 @@ function parseReportRouteParams(route: string): ReportRouteParams { const pathSegments = parsingRoute.split('/'); const reportIDSegment = pathSegments[1]; + const hasRouteReportActionID = !Number.isNaN(Number(reportIDSegment)); // Check for "undefined" or any other unwanted string values if (!reportIDSegment || reportIDSegment === 'undefined') { @@ -5344,7 +5345,7 @@ function parseReportRouteParams(route: string): ReportRouteParams { return { reportID: reportIDSegment, - isSubReportPageRoute: pathSegments.length > 2, + isSubReportPageRoute: pathSegments.length > 2 && !hasRouteReportActionID, }; }