Skip to content

Commit

Permalink
Merge pull request #41949 from Expensify/marco-fixCommentLinkAnonymou…
Browse files Browse the repository at this point in the history
…sSession

Check if the route has reportActionID in parseReportRouteParams
  • Loading branch information
marcochavezf authored May 13, 2024
2 parents 5627349 + b7f1680 commit f57257b
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 @@ -5348,6 +5348,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 @@ -5356,7 +5357,7 @@ function parseReportRouteParams(route: string): ReportRouteParams {

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

Expand Down

0 comments on commit f57257b

Please sign in to comment.