Skip to content

Commit

Permalink
separate check for reportAction with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
c3024 committed Sep 4, 2023
1 parent d3ad4c4 commit 882e77e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libs/ReportActionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 882e77e

Please sign in to comment.