From 47581e696492566684620b42a7ad476ec5f4c323 Mon Sep 17 00:00:00 2001
From: enahum <nahumhbl@gmail.com>
Date: Mon, 26 Dec 2016 11:28:40 -0300
Subject: Fix error after leaving team (#4888)

---
 webapp/actions/websocket_actions.jsx | 1 +
 1 file changed, 1 insertion(+)

(limited to 'webapp/actions/websocket_actions.jsx')

diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 63f2c535a..d03025efb 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -223,6 +223,7 @@ function handleLeaveTeamEvent(msg) {
         if (TeamStore.getCurrentId() === msg.data.team_id) {
             TeamStore.setCurrentId('');
             Client.setTeamId('');
+            BrowserStore.removeGlobalItem('team');
             BrowserStore.removeGlobalItem(msg.data.team_id);
             GlobalActions.redirectUserToDefaultTeam();
         }
-- 
cgit v1.2.3-1-g7c22

