Skip to content

Commit

Permalink
fix: update optimisticData for the current parent report action
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Aug 11, 2023
1 parent 893d943 commit 6927423
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,11 @@ function deleteReportComment(reportID, reportAction) {
];

// Update optimistic data for parent report action if the report is a child report
const optimisticParentReportData = ReportUtils.getOptimisticDataForParentReportAction(reportID, optimisticReport.lastVisibleActionCreated, CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);
const optimisticParentReportData = ReportUtils.getOptimisticDataForParentReportAction(
originalReportID,
optimisticReport.lastVisibleActionCreated,
CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
);
if (!_.isEmpty(optimisticParentReportData)) {
optimisticData.push(optimisticParentReportData);
}
Expand Down

0 comments on commit 6927423

Please sign in to comment.