From ddeb44dbc08b25f0bd5f2b7324faeb7d7e31906c Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Tue, 8 Jun 2021 15:54:23 +0530 Subject: [PATCH] fix: edited flag fluctuation --- src/libs/actions/Report.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 79d6c99c86e89..13dc95a09a1b8 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1201,6 +1201,11 @@ NetworkConnection.onReconnect(fetchAllReports); * @param {String} htmlForNewComment */ function editReportComment(reportID, originalReportAction, htmlForNewComment) { + // Skip the Edit if message is not changed + if (originalReportAction.message[0].html === htmlForNewComment.trim()) { + return; + } + // Optimistically update the report action with the new message const sequenceNumber = originalReportAction.sequenceNumber; const newReportAction = {...originalReportAction};