From 0e8eabe8cd034cf527977890326c02868fe5d091 Mon Sep 17 00:00:00 2001 From: tienifr Date: Wed, 8 Nov 2023 10:15:56 +0700 Subject: [PATCH] fix another places --- src/libs/actions/IOU.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 903dfaabced6..807fda234c48 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -1632,7 +1632,7 @@ function completeSplitBill(chatReportID, reportAction, updatedTransaction, sessi oneOnOneChatReport = existingChatReport || ReportUtils.buildOptimisticChatReport([participant.accountID]); } - let oneOnOneIOUReport = lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${oneOnOneChatReport.iouReportID}`, undefined); + let oneOnOneIOUReport = oneOnOneChatReport.iouReportID ? lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${oneOnOneChatReport.iouReportID}`, undefined) : undefined; const shouldCreateNewOneOnOneIOUReport = _.isUndefined(oneOnOneIOUReport) || (isPolicyExpenseChat && ReportUtils.isControlPolicyExpenseReport(oneOnOneIOUReport) && ReportUtils.isReportApproved(oneOnOneIOUReport));