Only get channels and posts on WebSocket connect if team is set (#3684)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
f5375254f9
Коммит
199c55b566
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user