summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/stores/channel_store.jsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index 58ea19419..1ffad280f 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -448,7 +448,8 @@ class ChannelStoreClass extends EventEmitter {
incrementMessages(id, markRead = false) {
if (!this.unreadCounts[id]) {
- return;
+ // Should never happen
+ console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
}
const member = this.getMyMember(id);
@@ -483,11 +484,11 @@ class ChannelStoreClass extends EventEmitter {
}
if (!this.unreadCounts[id]) {
- return;
+ // Should never happen
+ console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
}
if (mentions.indexOf(UserStore.getCurrentId()) !== -1) {
- this.unreadCounts[id].mentions++;
const member = {...this.getMyMember(id)};
member.mention_count++;
store.dispatch({