Correctly handly activeReplyBox optimization

This commit is contained in:
Chi Vinh Le
2017-08-17 23:23:18 +07:00
parent 25c11ad690
commit af4b01c2ae
@@ -130,7 +130,7 @@ export default class Comment extends React.Component {
const changes = getShallowChanges(this.props, next);
if (changes.length === 1 && changes[0] === 'activeReplyBox') {
if (
!containsCommentId(next, this.props.activeReplyBox) &&
!containsCommentId(this.props, this.props.activeReplyBox) &&
!containsCommentId(next, next.activeReplyBox)
) {
return false;