diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index 878ac3c9d0..4c89fe4803 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);