From 61bc5aebd72363a466c192838a2d9790612a6d64 Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Wed, 15 Mar 2023 13:12:48 -0700 Subject: [PATCH] Pass pendingAction string instead of reportAction --- src/pages/iou/IOUDetailsModal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js index e3380122db7a..54d6f5ac9853 100644 --- a/src/pages/iou/IOUDetailsModal.js +++ b/src/pages/iou/IOUDetailsModal.js @@ -144,9 +144,10 @@ class IOUDetailsModal extends Component { // Finds if there is a reportAction pending for this IOU findPendingAction() { - return _.find(this.props.reportActions, reportAction => reportAction.originalMessage + const reportActionWithPendingAction = _.find(this.props.reportActions, reportAction => reportAction.originalMessage && Number(reportAction.originalMessage.IOUReportID) === Number(this.props.route.params.iouReportID) && !_.isEmpty(reportAction.pendingAction)); + return reportActionWithPendingAction ? reportActionWithPendingAction.pendingAction : undefined; } render() {