diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 2ac014e22a1..d2450d0600c 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -472,7 +472,7 @@ function openReport(reportID, participantLoginList = [], newReportObject = {}, p // Add optimistic personal details for new participants const optimisticPersonalDetails = {}; - const failurePersonalDetails = {}; + const settledPersonalDetails = {}; _.map(participantLoginList, (login, index) => { const accountID = newReportObject.participantAccountIDs[index]; optimisticPersonalDetails[accountID] = allPersonalDetails[accountID] || { @@ -483,7 +483,7 @@ function openReport(reportID, participantLoginList = [], newReportObject = {}, p isOptimisticPersonalDetail: true, }; - failurePersonalDetails[accountID] = allPersonalDetails[accountID] || null; + settledPersonalDetails[accountID] = allPersonalDetails[accountID] || null; }); onyxData.optimisticData.push({ onyxMethod: Onyx.METHOD.MERGE, @@ -491,10 +491,15 @@ function openReport(reportID, participantLoginList = [], newReportObject = {}, p value: optimisticPersonalDetails, }); + onyxData.successData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.PERSONAL_DETAILS_LIST, + value: settledPersonalDetails, + }); onyxData.failureData.push({ onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.PERSONAL_DETAILS_LIST, - value: failurePersonalDetails, + value: settledPersonalDetails, }); // Add the createdReportActionID parameter to the API call