mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 03:43:48 +08:00
@@ -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