Skip to content

Commit

Permalink
canViewReview: undefined if no permission is set (#4025)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja authored Oct 14, 2024
1 parent f5a63da commit 4c408af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/meta/user/authorizer/canViewReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const hasEditSectionPermission = (

const userRole = Users.getRole(user, countryIso, cycle)

return countryStatus[userRole.role].includes(status) && hasCollaboratorEditSectionPermission(props)
return countryStatus[userRole.role]?.includes(status) && hasCollaboratorEditSectionPermission(props)
}

/**
Expand Down

0 comments on commit 4c408af

Please sign in to comment.