Skip to content
Snippets Groups Projects
Commit 22e7e0dd authored by Yannis Barlas's avatar Yannis Barlas
Browse files

Merge branch 'review-page-crashes' into 'master'

fix loading review page if no handling editor exists

See merge request xpub!88
parents 78bc1877 e22814be
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