Skip to content

Commit

Permalink
Update src/libs/PolicyUtils.js
Browse files Browse the repository at this point in the history
Co-authored-by: Abdelhafidh Belalia <[email protected]>
  • Loading branch information
jasperhuangg and s77rt authored Oct 17, 2023
1 parent fa42b03 commit d94ed73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/PolicyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const isPolicyAdmin = (policy) => lodashGet(policy, 'role') === CONST.POLICY.ROL
* @param {Object} policies
* @returns {Boolean}
*/
const isPolicyMember = (policyID, policies) => _.reduce(policies, (isMember, policy) => isMember || policy.id === policyID, false);
const isPolicyMember = (policyID, policies) => _.some(policies, (policy) => policy.id === policyID);

/**
* @param {Object} policyMembers
Expand Down

0 comments on commit d94ed73

Please sign in to comment.