summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-01-12 10:52:58 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-12 10:52:58 -0500
commit4208e42ba9df02b9c4bd7081179922c21206d83d (patch)
treeca557b5ffe3f498c1aba962e939275baf3381939 /webapp
parent45d18b364b7633fd52a53c713d9a2a3f06749273 (diff)
downloadchat-4208e42ba9df02b9c4bd7081179922c21206d83d.tar.gz
chat-4208e42ba9df02b9c4bd7081179922c21206d83d.tar.bz2
chat-4208e42ba9df02b9c4bd7081179922c21206d83d.zip
Fix JS error when receiving message in system console (#5019)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/stores/notification_store.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx
index 878ac3c9d..4c89fe480 100644
--- a/webapp/stores/notification_store.jsx
+++ b/webapp/stores/notification_store.jsx
@@ -111,7 +111,7 @@ class NotificationStoreClass extends EventEmitter {
// the window itself is not active
const activeChannel = ChannelStore.getCurrent();
const channelId = channel ? channel.id : null;
- const notify = activeChannel.id !== channelId || !this.inFocus;
+ const notify = (activeChannel && activeChannel.id !== channelId) || !this.inFocus;
if (notify) {
Utils.notifyMe(title, body, channel, teamId, duration, !sound);