Skip to content

Commit

Permalink
Fix UserList not loading error (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
developedBySJ authored Mar 18, 2022
1 parent 53fa950 commit 69335d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Users/ManageUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ export default function ManageUsers(props: any) {
currentUserLevel >= STATE_ADMIN_LEVEL &&
currentUserLevel < STATE_READ_ONLY_ADMIN_LEVEL
)
return user.state_object.id === currentUser.data.state;
return user.state_object?.id === currentUser?.data?.state;
if (currentUserLevel >= DISTRICT_ADMIN_LEVEL && currentUserLevel > level)
return user.district_object.id === currentUser.data.district;
return user?.district_object?.id === currentUser?.data?.district;
return false;
};

Expand Down

0 comments on commit 69335d2

Please sign in to comment.