Chats: fix error loading chatroom page

This commit is contained in:
Alex Gleason 2020-09-04 17:16:23 -05:00
parent ad3aa296cd
commit 8e6a662fbb
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}