From f1c49d9b3b171c8529b85b027a4537aa41d9810f Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Tue, 5 Jul 2016 07:21:59 -0400
Subject: fixed teams not displaying (#3472)

---
 webapp/components/select_team/select_team.jsx | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

(limited to 'webapp/components/select_team/select_team.jsx')

diff --git a/webapp/components/select_team/select_team.jsx b/webapp/components/select_team/select_team.jsx
index 39a2e4442..5fcaeb4de 100644
--- a/webapp/components/select_team/select_team.jsx
+++ b/webapp/components/select_team/select_team.jsx
@@ -102,29 +102,7 @@ export default class SelectTeam extends React.Component {
             }
         }
 
-        if (!this.state.teamListings.length && (global.window.mm_config.EnableTeamCreation === 'true' || isSystemAdmin)) {
-            teamContents = (
-                <div className='signup-team-dir-err'>
-                    <div>
-                        <FormattedMessage
-                            id='signup_team.no_teams_canCreate'
-                            defaultMessage='No teams have been created. You may create one by clicking "Create a new team".'
-                        />
-                    </div>
-                </div>
-            );
-        } else if (!this.state.teamListings.length) {
-            teamContents = (
-                <div className='signup-team-dir-err'>
-                    <div>
-                        <FormattedMessage
-                            id='signup_team.no_teams'
-                            defaultMessage='No teams have been created. Please contact your administrator.'
-                        />
-                    </div>
-                </div>
-            );
-        } else if (teamContents.length === 0 && openTeamContents.length === 0 && (global.window.mm_config.EnableTeamCreation === 'true' || isSystemAdmin)) {
+        if (this.state.teamMembers.length === 0 && teamContents.length === 0 && openTeamContents.length === 0 && (global.window.mm_config.EnableTeamCreation === 'true' || isSystemAdmin)) {
             teamContents = (
                 <div className='signup-team-dir-err'>
                     <div>
@@ -135,7 +113,7 @@ export default class SelectTeam extends React.Component {
                     </div>
                 </div>
             );
-        } else if (teamContents.length === 0 && openTeamContents.length === 0) {
+        } else if (this.state.teamMembers.length === 0 && teamContents.length === 0 && openTeamContents.length === 0) {
             teamContents = (
                 <div className='signup-team-dir-err'>
                     <div>
-- 
cgit v1.2.3-1-g7c22

