From 8e6a662fbb9084f591a95b367f584bd0ba64ff78 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 4 Sep 2020 17:16:23 -0500 Subject: [PATCH] Chats: fix error loading chatroom page --- app/soapbox/features/chats/chat_room.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/chats/chat_room.js b/app/soapbox/features/chats/chat_room.js index 4a8c480ea..f3e81cc12 100644 --- a/app/soapbox/features/chats/chat_room.js +++ b/app/soapbox/features/chats/chat_room.js @@ -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(); }