mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 11:09:40 +08:00
Fix some bugs
This commit is contained in:
@@ -209,7 +209,7 @@ class Comment extends React.Component {
|
||||
Comment.propTypes = {
|
||||
viewUserDetail: PropTypes.func.isRequired,
|
||||
acceptComment: PropTypes.func.isRequired,
|
||||
selectComment: PropTypes.func.isRequired,
|
||||
selectComment: PropTypes.func,
|
||||
rejectComment: PropTypes.func.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
className: PropTypes.string,
|
||||
|
||||
@@ -129,7 +129,7 @@ class ModerationQueue extends React.Component {
|
||||
}
|
||||
|
||||
// Scroll to selected comment.
|
||||
if (prev.selectedCommentId !== this.props.selectedCommentId) {
|
||||
if (prev.selectedCommentId !== this.props.selectedCommentId && this.listRef) {
|
||||
|
||||
const view = this.getVisibleComments();
|
||||
const index = view.findIndex(({id}) => id === this.props.selectedCommentId);
|
||||
@@ -298,7 +298,6 @@ class ModerationQueue extends React.Component {
|
||||
rejectComment={props.rejectComment}
|
||||
currentAsset={props.currentAsset}
|
||||
currentUserId={this.props.currentUserId}
|
||||
selectComment={() => this.props.selectCommentId(comment.id)}
|
||||
/>;
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user