Skip to content

Commit ff294f5

Browse files
committed
fix test
1 parent 025d44d commit ff294f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libs/SearchUIUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,14 +765,15 @@ function getReportSections(data: OnyxTypes.SearchResults['data'], metadata: Onyx
765765
const transactions = reportIDToTransactions[reportKey]?.transactions ?? [];
766766
const isIOUReport = reportItem.type === CONST.REPORT.TYPE.IOU;
767767

768+
const reportPendingAction = reportItem?.pendingAction ?? reportItem?.pendingFields?.preview;
768769
reportIDToTransactions[reportKey] = {
769770
...reportItem,
770771
action: getAction(data, allViolations, key),
771772
keyForList: reportItem.reportID,
772773
from: data.personalDetailsList?.[reportItem.accountID ?? CONST.DEFAULT_NUMBER_ID],
773774
to: reportItem.managerID ? data.personalDetailsList?.[reportItem.managerID] : emptyPersonalDetails,
774775
transactions,
775-
pendingAction: reportItem?.pendingAction ?? reportItem?.pendingFields?.preview,
776+
...(reportPendingAction ? {pendingAction: reportPendingAction} : {}),
776777
};
777778

778779
if (isIOUReport) {

0 commit comments

Comments
 (0)