diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js index 5c1538682ce3..b4e8f1ff46ce 100644 --- a/src/libs/IOUUtils.js +++ b/src/libs/IOUUtils.js @@ -82,8 +82,8 @@ function getIOUReportActions(reportActions, iouReport, type = '', pendingAction return _.chain(reportActions) .filter(action => action.originalMessage && action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU - && action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString()) - .filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true)) + && (!_.isEmpty(type) ? action.originalMessage.type === type : true)) + .filter(action => action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString()) .filter(action => (!_.isEmpty(pendingAction) ? action.pendingAction === pendingAction : true)) .filter(action => (filterRequestsInDifferentCurrency ? action.originalMessage.currency !== iouReport.currency : true)) .value();