diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-07-27 09:53:49 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-07-27 09:53:49 -0400 |
commit | 199c55b5662789e27858a2da9461d4e2ea6026c5 (patch) | |
tree | b8ec0c46582d143581400334b747226f93a246a9 | |
parent | f5375254f90053bd9b688d36f758aca309ec3735 (diff) | |
download | chat-199c55b5662789e27858a2da9461d4e2ea6026c5.tar.gz chat-199c55b5662789e27858a2da9461d4e2ea6026c5.tar.bz2 chat-199c55b5662789e27858a2da9461d4e2ea6026c5.zip |
Only get channels and posts on WebSocket connect if team is set (#3684)
-rw-r--r-- | webapp/actions/websocket_actions.jsx | 6 | ||||
-rw-r--r-- | webapp/client/client.jsx | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx index 6be7057a7..61503c68a 100644 --- a/webapp/actions/websocket_actions.jsx +++ b/webapp/actions/websocket_actions.jsx @@ -62,8 +62,10 @@ export function getStatuses() { } function handleReconnect() { - AsyncClient.getChannels(); - AsyncClient.getPosts(ChannelStore.getCurrentId()); + if (Client.teamId) { + AsyncClient.getChannels(); + AsyncClient.getPosts(ChannelStore.getCurrentId()); + } getStatuses(); ErrorStore.clearLastError(); ErrorStore.emitChange(); diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx index 88da51372..cf015bc84 100644 --- a/webapp/client/client.jsx +++ b/webapp/client/client.jsx @@ -40,7 +40,7 @@ export default class Client { } getTeamId() { - if (this.teamId === '') { + if (!this.teamId) { console.error('You are trying to use a route that requires a team_id, but you have not called setTeamId() in client.jsx'); // eslint-disable-line no-console } |