Skip to content

Commit

Permalink
Merge pull request #44836 from nyomanjyotisa/fix-filter-out-the-recei…
Browse files Browse the repository at this point in the history
…ver-policy

[CP Staging] fix: filter out the receiver policy
  • Loading branch information
luacmartins authored Jul 4, 2024
2 parents 2cee64d + 124e435 commit fa75984
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ function shouldShowPolicy(policy: OnyxEntry<Policy>, isOffline: boolean): boolea
return (
!!policy &&
(policy?.type !== CONST.POLICY.TYPE.PERSONAL || !!policy?.isJoinRequestPending) &&
(isOffline || policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || Object.keys(policy.errors ?? {}).length > 0)
(isOffline || policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || Object.keys(policy.errors ?? {}).length > 0) &&
!!policy?.role
);
}

Expand Down

0 comments on commit fa75984

Please sign in to comment.