Skip to content

Commit

Permalink
Move the comment
Browse files Browse the repository at this point in the history
Co-authored-by: Monil Bhavsar <[email protected]>
  • Loading branch information
paultsimura and MonilBhavsar authored Apr 11, 2024
1 parent 0ec956a commit 32f8dd5
Showing 1 changed file with 1 addition 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 @@ -217,9 +217,9 @@ function isTransactionThread(parentReportAction: OnyxEntry<ReportAction> | Empty
* Returns the reportID for the transaction thread associated with a report by iterating over the reportActions and identifying the IOU report actions with a childReportID. Returns a reportID if there is exactly one transaction thread for the report, and null otherwise.
*/
function getOneTransactionThreadReportID(reportID: string, reportActions: OnyxEntry<ReportActions> | ReportAction[]): string | null {
// If the report is not an IOU or Expense report, it shouldn't be treated as one-transaction report.
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
if (report?.type !== CONST.REPORT.TYPE.IOU && report?.type !== CONST.REPORT.TYPE.EXPENSE) {
// If the report is not an IOU or Expense report, it shouldn't be treated as one-transaction report.
return null;
}

Expand Down

0 comments on commit 32f8dd5

Please sign in to comment.