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/utils/async_client.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/utils/async_client.jsx')

diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index 66f13f04d..25724ec5e 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -139,7 +139,7 @@ export function getMyChannelMembers() {
 }
 
 export function viewChannel(channelId = ChannelStore.getCurrentId(), prevChannelId = '', time = 0) {
-    if (channelId == null) {
+    if (channelId == null || !Client.teamId) {
         return;
     }
 
-- 
cgit v1.2.3-1-g7c22

