Skip to content

Commit

Permalink
Merge pull request #1441 from culturecreates/bugfix/issue-1433
Browse files Browse the repository at this point in the history
fix: replace equal with includes check
  • Loading branch information
AbhishekPAnil authored Nov 11, 2024
2 parents 63bc857 + 7dc454a commit 94400d6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1248,12 +1248,7 @@ function AddEvent() {
};

const roleCheckHandler = () => {
if (
calendar[0]?.role === userRoles.EDITOR ||
calendar[0]?.role === userRoles.ADMIN ||
calendar[0]?.role === userRoles.CONTRIBUTOR ||
user.isSuperAdmin
)
if ([userRoles.ADMIN, userRoles.CONTRIBUTOR, userRoles.EDITOR].includes(calendar[0]?.role) || user.isSuperAdmin)
return (
<>
<Form.Item>
Expand Down

0 comments on commit 94400d6

Please sign in to comment.