Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,7 @@ function getReportPreviewMessage(
const report = typeof reportOrID === 'string' ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportOrID}`] : reportOrID;
const reportActionMessage = ReportActionsUtils.getReportActionHtml(iouReportAction);

if (isEmptyObject(report) || !report?.reportID || isEmptyObject(iouReportAction)) {
if (isEmptyObject(report) || !report?.reportID) {
// The iouReport is not found locally after SignIn because the OpenApp API won't return iouReports if they're settled
// As a temporary solution until we know how to solve this the best, we just use the message that returned from BE
return reportActionMessage;
Expand Down Expand Up @@ -3017,7 +3017,7 @@ function getReportPreviewMessage(
return Localize.translateLocal('iou.fieldPending');
}

const originalMessage = ReportActionsUtils.isMoneyRequestAction(iouReportAction) ? ReportActionsUtils.getOriginalMessage(iouReportAction) : undefined;
const originalMessage = !isEmptyObject(iouReportAction) && ReportActionsUtils.isMoneyRequestAction(iouReportAction) ? ReportActionsUtils.getOriginalMessage(iouReportAction) : undefined;

// Show Paid preview message if it's settled or if the amount is paid & stuck at receivers end for only chat reports.
if (isSettled(report.reportID) || (report.isWaitingOnBankAccount && isPreviewMessageForParentChatReport)) {
Expand Down