From 521d97624c57d833b7671a58459008f6555410ec Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 27 Nov 2023 17:40:39 +0700 Subject: [PATCH] fix: 30839 All of the IOU chats disappear when I do the same IOU and turn the connection on --- src/pages/home/report/ReportActionsView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index b4d21de919b..607d9803907 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -103,8 +103,9 @@ function ReportActionsView(props) { const isReportFullyVisible = useMemo(() => getIsReportFullyVisible(isFocused), [isFocused]); const openReportIfNecessary = () => { + const createChatError = _.get(props.report, ['errorFields', 'createChat']); // If the report is optimistic (AKA not yet created) we don't need to call openReport again - if (props.report.isOptimisticReport) { + if (props.report.isOptimisticReport || !_.isEmpty(createChatError)) { return; }