Skip to content

Commit

Permalink
Check if the route has reportActionID in parseReportRouteParams
Browse files Browse the repository at this point in the history
  • Loading branch information
marcochavezf committed May 9, 2024
1 parent 548a23c commit b7f1680
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -5344,7 +5345,7 @@ function parseReportRouteParams(route: string): ReportRouteParams {

return {
reportID: reportIDSegment,
isSubReportPageRoute: pathSegments.length > 2,
isSubReportPageRoute: pathSegments.length > 2 && !hasRouteReportActionID,
};
}

Expand Down

0 comments on commit b7f1680

Please sign in to comment.