Chats: fix error loading chatroom page
This commit is contained in:
parent
ad3aa296cd
commit
8e6a662fbb
1 changed files with 2 additions and 2 deletions
|
@ -58,11 +58,11 @@ class ChatRoom extends ImmutablePureComponent {
|
|||
|
||||
componentDidUpdate(prevProps) {
|
||||
const markReadConditions = [
|
||||
() => this.props.chat !== undefined,
|
||||
() => this.props.chat,
|
||||
() => this.props.chat.get('unread') > 0,
|
||||
];
|
||||
|
||||
if (markReadConditions.every(c => c() === true))
|
||||
if (markReadConditions.every(c => c()))
|
||||
this.markRead();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue