More refactor

This commit is contained in:
Chi Vinh Le
2017-12-21 18:43:39 +01:00
parent e34f96832a
commit 111af0acf8
@@ -194,6 +194,7 @@ class ModerationQueue extends React.Component {
const switchedMode = prev.singleView !== this.props.singleView;
const selectedDifferentComment = prev.selectedCommentId !== selectedCommentId && selectedCommentId;
const moderatedLastComment = prev.comments.length > 0 && this.getCommentCountWithoutDagling() === 0;
const hasMoreComment = commentCount > 0;
if (switchedToMultiMode) {
@@ -205,7 +206,7 @@ class ModerationQueue extends React.Component {
this.scrollToSelectedComment();
}
if (moderatedLastComment && commentCount > 0) {
if (moderatedLastComment && hasMoreComment) {
this.props.loadMore();
}
}