Skip to content

Commit

Permalink
simplify logic and resolve 'line too long' lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Julesssss committed May 5, 2023
1 parent ac3083b commit 721d353
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportActionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function getSortedReportActions(reportActions, shouldSortInDescendingOrder = fal
* @returns {String}
*/
function getMostRecentIOURequestActionID(reportActions) {
const iouRequestActions = _.filter(reportActions, action => [CONST.IOU.REPORT_ACTION_TYPE.CREATE, CONST.IOU.REPORT_ACTION_TYPE.SPLIT].includes(lodashGet(action, 'originalMessage.type')));
const iouRequestTypes = [CONST.IOU.REPORT_ACTION_TYPE.CREATE, CONST.IOU.REPORT_ACTION_TYPE.SPLIT];
const iouRequestActions = _.filter(reportActions, action => iouRequestTypes.includes(lodashGet(action, 'originalMessage.type')));

if (_.isEmpty(iouRequestActions)) {
return null;
Expand Down

0 comments on commit 721d353

Please sign in to comment.