Skip to content

Commit

Permalink
Merge pull request Expensify#48232 from daledah/fix/47892
Browse files Browse the repository at this point in the history
fix: clicking on a chat row in a thread within a thread leads to "not found" page
  • Loading branch information
arosiclair authored Aug 30, 2024
2 parents 4b075a0 + 697061d commit 4883a42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionItemParentAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ function ReportActionItemParentAction({
) : (
<ReportActionItem
onPress={
ReportUtils.canCurrentUserOpenReport(ancestorReports.current?.[ancestor?.report?.parentReportID ?? '-1'])
ReportUtils.canCurrentUserOpenReport(ancestorReports.current?.[ancestor?.report?.reportID ?? '-1'])
? () => {
const isVisibleAction = ReportActionsUtils.shouldReportActionBeVisible(ancestor.reportAction, ancestor.reportAction.reportActionID ?? '-1');
// Pop the thread report screen before navigating to the chat report.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ?? '-1'));
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID ?? '-1'));
if (isVisibleAction && !isOffline) {
// Pop the chat report screen before navigating to the linked report action.
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.parentReportID ?? '-1', ancestor.reportAction.reportActionID));
Navigation.goBack(ROUTES.REPORT_WITH_ID.getRoute(ancestor.report.reportID ?? '-1', ancestor.reportAction.reportActionID));
}
}
: undefined
Expand Down

0 comments on commit 4883a42

Please sign in to comment.