Skip to content

Commit

Permalink
safely access policy id
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Oct 20, 2023
1 parent ad8b9ff commit 03356bd
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) => _.some(policies, (policy) => policy.id === policyID);
const isPolicyMember = (policyID, policies) => _.some(policies, (policy) => lodashGet(policy, 'id') === policyID);

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

0 comments on commit 03356bd

Please sign in to comment.