Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rinej committed Jul 4, 2024
1 parent bcca27b commit 580243d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ function shouldIgnoreGap(currentReportAction: ReportAction | undefined, nextRepo
}

/**
* Returns filtered list for one transaction view
* Returns filtered list for one transaction view as we don't want to display IOU action type in the one-transaction view
* Separated it from getCombinedReportActions, so it can be reused
*/
function getFilteredForOneTransactionView(reportActions: ReportAction[]): ReportAction[] {
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ function ReportActionsView({
createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE;
}

// moneyRequestActions.length === 1 indicates that we have one-transaction report and we don't want to display additonal IOU action
return moneyRequestActions.length === 1 ? ReportActionsUtils.getFilteredForOneTransactionView([...actions, createdAction]) : [...actions, createdAction];
}, [allReportActions, report, transactionThreadReport]);

Expand Down

0 comments on commit 580243d

Please sign in to comment.