Skip to content

Commit

Permalink
Merge pull request #47298 from bernhardoj/fix/47159-unable-to-split-w…
Browse files Browse the repository at this point in the history
…ith-workspace

Fix unable to split with workspace from FAB
  • Loading branch information
Beamanator authored Aug 13, 2024
2 parents d862286 + c916726 commit 21c7d65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 21c7d65

Please sign in to comment.