sforkowany z mirror/soapbox
Chats: fix error loading chatroom page
rodzic
ad3aa296cd
commit
8e6a662fbb
|
@ -58,11 +58,11 @@ class ChatRoom extends ImmutablePureComponent {
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
const markReadConditions = [
|
const markReadConditions = [
|
||||||
() => this.props.chat !== undefined,
|
() => this.props.chat,
|
||||||
() => this.props.chat.get('unread') > 0,
|
() => this.props.chat.get('unread') > 0,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (markReadConditions.every(c => c() === true))
|
if (markReadConditions.every(c => c()))
|
||||||
this.markRead();
|
this.markRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue