From 8f543ba46d48c62701054f51fb2ffdec6a3cab82 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 19 Jul 2021 10:01:45 -1000 Subject: [PATCH] Stop call to Get=reportStuff with reportID = undefined --- src/libs/actions/Report.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 75c82c8a3eb5..81c94e13f8af 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -331,7 +331,13 @@ function fetchChatReportsByIDs(chatList) { } return fetchIOUReportID(participants[0]) - .then(iouReportID => fetchIOUReport(iouReportID, chatReport.reportID)); + .then((iouReportID) => { + if (!iouReportID) { + return Promise.resolve(); + } + + return fetchIOUReport(iouReportID, chatReport.reportID); + }); })); }) .then((iouReportObjects) => {