mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
Fix zen mode
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user