Fix cursor bug

This commit is contained in:
Chi Vinh Le
2017-12-14 16:51:50 +01:00
parent 60f6c63c8a
commit 0bda44e97f
@@ -166,8 +166,9 @@ class ModerationQueue extends React.Component {
const {comments: prevComments} = this.props;
const {comments: nextComments} = next;
if (!prevComments && nextComments || !prevComments.length && nextComments.length) {
this.setState(resetCursors);
// New comments where added and our cursor list is incomplete.
if (this.state.idCursors.length < 2 && nextComments.length > this.state.idCursors.length) {
this.setState(resetCursors(this.state, next));
return;
}