mirror of
https://github.com/wassname/talk.git
synced 2026-10-04 13:10:23 +08:00
Fix some bugs
This commit is contained in:
1 parent
b12d5f6bd7
commit
51bd109f13
2 files changed
+2
-3
No files matched your search
@@ -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