Skip to content

Commit

Permalink
Fix collaborator list crashing (#3476)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaguzmang authored Feb 7, 2024
1 parent bb2dba4 commit ac8d739
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'

import classNames from 'classnames'
import { Objects } from 'utils/objects'

import { RoleName, User, Users } from 'meta/user'
import { UserRoles } from 'meta/user/userRoles'
Expand All @@ -20,7 +21,10 @@ const CollaboratorListElement: React.FC<{ user: User; readOnly: boolean }> = ({
const currentUser = useUser()
const isReviewer = Users.isReviewer(currentUser, countryIso, cycle)
const userRole = Users.getRole(user, countryIso, cycle)
const { acceptedAt, invitationUuid } = userRole ?? {}

if (Objects.isEmpty(userRole)) return null

const { acceptedAt, invitationUuid } = userRole

const showLink = !readOnly

Expand Down

0 comments on commit ac8d739

Please sign in to comment.