From 32f8dd5b6597c5dcdebe3d88dfbdb7dc26d95afe Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Thu, 11 Apr 2024 11:03:37 +0200 Subject: [PATCH] Move the comment Co-authored-by: Monil Bhavsar --- src/libs/ReportActionsUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 504bbba5d964..135e9eece17d 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -217,9 +217,9 @@ function isTransactionThread(parentReportAction: OnyxEntry | 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 | 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; }