From d3ad4c43ec186ef8c7cc9a11b6bb914536fb1eee Mon Sep 17 00:00:00 2001 From: c3024 Date: Mon, 4 Sep 2023 16:54:17 +0530 Subject: [PATCH 1/2] reportAction with errors - not lastVisibleAction --- src/libs/ReportActionsUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 3ed10b865812..ad63a6b6d93a 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -358,7 +358,7 @@ function shouldReportActionBeVisible(reportAction, key) { * @returns {Boolean} */ function shouldReportActionBeVisibleAsLastAction(reportAction) { - if (!reportAction) { + if (!reportAction || !_.isEmpty(reportAction.errors)) { return false; } From 882e77e315ab7a9599f667a02dde73650758c40f Mon Sep 17 00:00:00 2001 From: c3024 Date: Mon, 4 Sep 2023 17:26:22 +0530 Subject: [PATCH 2/2] separate check for reportAction with errors --- src/libs/ReportActionsUtils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index ad63a6b6d93a..9cbc414bf582 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -358,7 +358,11 @@ function shouldReportActionBeVisible(reportAction, key) { * @returns {Boolean} */ function shouldReportActionBeVisibleAsLastAction(reportAction) { - if (!reportAction || !_.isEmpty(reportAction.errors)) { + if (!reportAction) { + return false; + } + + if (!_.isEmpty(reportAction.errors)) { return false; }