Skip to content

Commit

Permalink
fix: refactor function code
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Nov 11, 2024
1 parent f0aea5b commit 8142c68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1705,8 +1705,9 @@ function isOneTransactionThread(reportID: string, parentReportID: string, thread
*/
function getDisplayedReportID(reportID: string): string {
const report = getReport(reportID);
const parentReportAction = ReportActionsUtils.getReportAction(report?.parentReportID ?? '-1', report?.parentReportActionID ?? '-1');
return (isOneTransactionThread(report?.reportID ?? '', report?.parentReportID ?? '', parentReportAction) ? report?.parentReportID : reportID) ?? '';
const parentReportID = report?.parentReportID ?? '';
const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, report?.parentReportActionID ?? '');
return isOneTransactionThread(reportID, parentReportID, parentReportAction) ? parentReportID : reportID;
}

/**
Expand Down

0 comments on commit 8142c68

Please sign in to comment.