Commit 0ccd74ec authored by Yannis Barlas's avatar Yannis Barlas

fix(editor panel): fix blank screen when loading editor panel

parent ec33deb3
......@@ -43,7 +43,10 @@ const mapProps = args => {
return {
allEditors: getAllEditors(args.getGlobalTeams.data.globalTeams),
editor: editor && allEditorIds.includes(editor.id) ? editor : null,
editor:
editor && allEditorIds && allEditorIds.includes(editor.id)
? editor
: null,
editorTeamId: editorTeamForArticle && editorTeamForArticle.id,
loading: args.getGlobalTeams.loading || args.getTeams.loading,
updateCurrentlyWith: args.updateCurrentlyWith.updateCurrentlyWith,
......
......@@ -92,7 +92,10 @@ const mapProps = args => {
return {
article: args.getArticleForEditor.data.manuscript,
editor: editor && allEditorIds.includes(editor.id) ? editor : null,
editor:
editor && allEditorIds && allEditorIds.includes(editor.id)
? editor
: null,
editorSuggestedReviewers: union(reviewersTeam, externalReviewersTeam),
loading:
args.getTeamsForArticle.loading ||
......@@ -105,7 +108,9 @@ const mapProps = args => {
},
reviews: get(args.getReviewsForArticle, 'data.reviewsForArticle'),
scienceOfficer:
scienceOfficer && allScienceOfficerIds.includes(scienceOfficer.id)
scienceOfficer &&
allScienceOfficerIds &&
allScienceOfficerIds.includes(scienceOfficer.id)
? scienceOfficer
: null,
sendChat: args.sendChatMutation.sendChat,
......
Markdown is supported
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