From 5b6700cd644d54e119b891e91513136b5561a1d8 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 15 Dec 2023 17:23:58 +0100 Subject: [PATCH] remove variable --- src/libs/actions/IOU.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index 9a02c16024ce..1e69bd236f0f 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -2936,11 +2936,6 @@ function approveMoneyRequest(expenseReport) { statusNum: CONST.REPORT.STATUS.APPROVED, }, }; - const optimisticNextStepsData = { - onyxMethod: Onyx.METHOD.SET, - key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport.reportID}`, - value: null, - }; const optimisticData = [optimisticIOUReportData, optimisticReportActionsData]; const successData = [ @@ -2968,7 +2963,11 @@ function approveMoneyRequest(expenseReport) { ]; if (!_.isNull(currentNextStep)) { - optimisticData.push(optimisticNextStepsData); + optimisticData.push({ + onyxMethod: Onyx.METHOD.SET, + key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport.reportID}`, + value: null, + }); failureData.push({ onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport.reportID}`,