diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-13 22:22:21 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-02-13 22:22:21 -0500 |
commit | 8da1c696d4488890bc1670b8189ddfcd694c0406 (patch) | |
tree | b465af24a261eb5b4d550e8d763bb5f4fc470fce /webapp | |
parent | 62e20e98f9e22dbac6af80cca9a0494e9f0ea662 (diff) | |
download | chat-8da1c696d4488890bc1670b8189ddfcd694c0406.tar.gz chat-8da1c696d4488890bc1670b8189ddfcd694c0406.tar.bz2 chat-8da1c696d4488890bc1670b8189ddfcd694c0406.zip |
Fix JS error on out of channel mentions and slash commands (#5395)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/stores/team_store.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx index b0133e44c..46f84bc1f 100644 --- a/webapp/stores/team_store.jsx +++ b/webapp/stores/team_store.jsx @@ -401,8 +401,8 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => { return; } - var id = action.websocketMessageProps ? action.websocketMessageProps.team_id : ''; - if (TeamStore.getCurrentId() !== id && id.length > 0) { + var id = action.websocketMessageProps ? action.websocketMessageProps.team_id : null; + if (id && TeamStore.getCurrentId() !== id) { TeamStore.incrementMessages(id, action.post.channel_id); TeamStore.incrementMentionsIfNeeded(id, action.websocketMessageProps); TeamStore.emitChange(); |