summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-13 22:22:21 -0500
committerCorey Hulen <corey@hulen.com>2017-02-13 22:22:21 -0500
commit8da1c696d4488890bc1670b8189ddfcd694c0406 (patch)
treeb465af24a261eb5b4d550e8d763bb5f4fc470fce
parent62e20e98f9e22dbac6af80cca9a0494e9f0ea662 (diff)
downloadchat-8da1c696d4488890bc1670b8189ddfcd694c0406.tar.gz
chat-8da1c696d4488890bc1670b8189ddfcd694c0406.tar.bz2
chat-8da1c696d4488890bc1670b8189ddfcd694c0406.zip
Fix JS error on out of channel mentions and slash commands (#5395)
-rw-r--r--webapp/stores/team_store.jsx4
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();