Skip to content

Commit 8286359

Browse files
committed
Refactor documentation for transaction thread report actions to clarify return values
1 parent acfd5bc commit 8286359

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/libs/ReportActionsUtils.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,8 +1253,8 @@ const isIOUActionMatchingTransactionList = (
12531253
};
12541254

12551255
/**
1256-
* Gets the reportID for the transaction thread associated with a report by iterating over the reportActions and identifying the IOU report actions.
1257-
* Returns a reportID if there is exactly one transaction thread for the report, and null otherwise.
1256+
* Gets the report action for the transaction thread associated with a report by iterating over the reportActions and identifying the IOU report actions.
1257+
* Returns a report action if there is exactly one transaction thread for the report, and undefined otherwise.
12581258
*/
12591259
function getOneTransactionThreadReportAction(
12601260
report: OnyxEntry<Report>,
@@ -1321,10 +1321,13 @@ function getOneTransactionThreadReportAction(
13211321
return;
13221322
}
13231323

1324-
// Ensure we have a childReportID associated with the IOU report action
13251324
return singleAction;
13261325
}
13271326

1327+
/**
1328+
* Gets the reportID for the transaction thread associated with a report by iterating over the reportActions and identifying the IOU report actions.
1329+
* Returns a reportID if there is exactly one transaction thread for the report, and undefined otherwise.
1330+
*/
13281331
function getOneTransactionThreadReportID(...args: Parameters<typeof getOneTransactionThreadReportAction>): string | undefined {
13291332
return getOneTransactionThreadReportAction(...args)?.childReportID;
13301333
}

0 commit comments

Comments
 (0)