diff options
author | enahum <nahumhbl@gmail.com> | 2016-12-14 12:27:54 -0300 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-12-14 10:27:54 -0500 |
commit | 778e89aab4bbca74545a24375ff608342c170766 (patch) | |
tree | f1c465dfda59dbf15a389d38d43f160090335ab3 /webapp | |
parent | 3e350527a54358b15968fe0903a50dea7174dbf6 (diff) | |
download | chat-778e89aab4bbca74545a24375ff608342c170766.tar.gz chat-778e89aab4bbca74545a24375ff608342c170766.tar.bz2 chat-778e89aab4bbca74545a24375ff608342c170766.zip |
Fix JS error when someone posts a message in a another team (#4791)
Diffstat (limited to 'webapp')
-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); |