Fix zen mode

This commit is contained in:
Chi Vinh Le
2018-02-02 15:50:43 +01:00
parent ac67b0484b
commit aec0251c4f
@@ -397,6 +397,13 @@ class ModerationQueue extends React.Component {
const index = comments.findIndex(
comment => comment.id === selectedCommentId
);
// This can happen temporarily when we call redux to change the selected comment
// but it didn't fully take effect yet.
if (index === -1) {
return null;
}
const comment = comments[index];
return (
<div className={styles.root}>