Skip to content

Commit

Permalink
fix: delete draft comment for duplicated report
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Jul 12, 2024
1 parent 64649ce commit ed8fdb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,8 @@ function handleReportChanged(report: OnyxEntry<Report>) {
if (report?.reportID && report.preexistingReportID) {
let callback = () => {
Onyx.set(`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`, null);
Onyx.set(`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}`, null);
};

// Only re-route them if they are still looking at the optimistically created report
if (Navigation.getActiveRoute().includes(`/r/${report.reportID}`)) {
const currCallback = callback;
Expand Down

0 comments on commit ed8fdb0

Please sign in to comment.