Fixing websocket and team store issues when leaving team (#4412)

Этот коммит содержится в:
Christopher Speller
2016-11-01 15:50:34 -04:00
коммит произвёл Joram Wilander
родитель 60a43a5b4f
Коммит b0f38f8a84
3 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@@ -211,10 +211,10 @@ function handleNewUserEvent(msg) {
function handleLeaveTeamEvent(msg) {
if (UserStore.getCurrentId() === msg.data.user_id) {
TeamStore.removeMyTeamMember(msg.broadcast.team_id);
TeamStore.removeMyTeamMember(msg.data.team_id);
// if they are on the team being removed redirect them to the root
if (TeamStore.getCurrentId() === msg.broadcast.team_id) {
if (TeamStore.getCurrentId() === msg.data.team_id) {
TeamStore.setCurrentId('');
Client.setTeamId('');
browserHistory.push('/');