Skip to content
Snippets Groups Projects
Commit e22814be authored by Giannis Kopanas's avatar Giannis Kopanas
Browse files

fix loading review page if no handling editor exists

parent 78bc1877
No related branches found
No related tags found
No related merge requests found
......@@ -78,15 +78,17 @@ export default compose(
const version = selectFragment(state, match.params.version)
const currentVersion = selectCurrentVersion(state, project)
const handlingEditors = state.teams
.find(
team =>
team.object.type === 'collection' &&
team.object.id === match.params.project &&
team.teamType.name === 'handlingEditor',
)
.members.map(id => selectUser(state, id))
let handlingEditors
const editors = state.teams.find(
team =>
team.object.type === 'collection' &&
team.object.id === match.params.project &&
team.teamType.name === 'handlingEditor',
)
if (editors) {
handlingEditors = editors.members.map(id => selectUser(state, id))
}
const reviewer = getReviewerFromUser(project, currentVersion, currentUser)
return {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment