From c916726c7906072dce9c54591850549d20664a97 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 13 Aug 2024 17:08:31 +0800 Subject: [PATCH] fix can't split with workspace from fab --- src/libs/actions/IOU.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 412a7a1a1b7f..836952cc5e0c 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -3811,10 +3811,10 @@ function trackExpense( function getOrCreateOptimisticSplitChatReport(existingSplitChatReportID: string, participants: Participant[], participantAccountIDs: number[], currentUserAccountID: number) { // The existing chat report could be passed as reportID or exist on the sole "participant" (in this case a report option) - const existingChatReportID = existingSplitChatReportID ?? participants[0].reportID ?? ''; + const existingChatReportID = existingSplitChatReportID || participants[0].reportID; // Check if the report is available locally if we do have one - let existingSplitChatReport = ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${existingChatReportID}`]; + let existingSplitChatReport = existingChatReportID ? ReportConnection.getAllReports()?.[`${ONYXKEYS.COLLECTION.REPORT}${existingChatReportID}`] : null; const allParticipantsAccountIDs = [...participantAccountIDs, currentUserAccountID]; if (!existingSplitChatReport) {