Skip to content

Commit

Permalink
create optimistic personal detail only if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Oct 30, 2023
1 parent b321b0a commit 480e84e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,9 @@ function getMoneyRequestInformation(
iouReport.parentReportActionID = reportPreviewAction.reportActionID;
}

const shouldCreateOptimisticPersonalDetails = isNewChatReport && !allPersonalDetails[payerAccountID];
// Add optimistic personal details for participant
const optimisticPersonalDetailListAction = isNewChatReport
const optimisticPersonalDetailListAction = shouldCreateOptimisticPersonalDetails
? {
[payerAccountID]: {
accountID: payerAccountID,
Expand Down

0 comments on commit 480e84e

Please sign in to comment.