diff options
-rw-r--r-- | webapp/stores/notification_store.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/stores/notification_store.jsx b/webapp/stores/notification_store.jsx index d5e8acb4d..9d0e6c790 100644 --- a/webapp/stores/notification_store.jsx +++ b/webapp/stores/notification_store.jsx @@ -107,7 +107,8 @@ class NotificationStoreClass extends EventEmitter { // Notify if you're not looking in the right channel or when // the window itself is not active const activeChannel = ChannelStore.getCurrent(); - const notify = activeChannel.id !== channel.id || !this.inFocus; + const channelId = channel ? channel.id : null; + const notify = activeChannel.id !== channelId || !this.inFocus; if (notify) { Utils.notifyMe(title, body, channel, teamId, duration, !sound); |