From 480e84e093714979889db6894181ce52532c017a Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Mon, 30 Oct 2023 23:34:13 +0800 Subject: [PATCH] create optimistic personal detail only if it doesn't exist --- src/libs/actions/IOU.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 77ab246506ce..c96ff49183c9 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -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,