diff --git a/Spaces/TopSpace.js b/Spaces/TopSpace.js index 5c11128dc..52c7efbae 100644 --- a/Spaces/TopSpace.js +++ b/Spaces/TopSpace.js @@ -39,6 +39,9 @@ function newTopSpace() { eventHandler: newEventHandler() }; + thisObject.login = newLogin(); + thisObject.login.initialize(); + thisObject.companyLogo = newCompanyLogo(); thisObject.companyLogo.initialize(); @@ -57,9 +60,6 @@ function newTopSpace() { thisObject.currentStartMode = newCurrentStartMode(); thisObject.currentStartMode.initialize(sharedStatus); - thisObject.login = newLogin(); - thisObject.login.initialize(); - } function getContainer(point) { diff --git a/TopSpace/DevTeam.js b/TopSpace/DevTeam.js index c75577ca0..bc6e75d5d 100644 --- a/TopSpace/DevTeam.js +++ b/TopSpace/DevTeam.js @@ -21,7 +21,7 @@ function newDevTeam() { container.isDraggeable = false; container.isClickeable = true; - const NOT_FOUND = ""; + const NOT_FOUND = "Team NOT FOUND"; let sharedStatus; let label = "" @@ -30,11 +30,18 @@ function newDevTeam() { function initialize(pSharedStatus) { + let sessionToken = window.localStorage.getItem('sessionToken'); + + if (sessionToken === null || sessionToken === "") { + /* not logged in */ + return; + } + sharedStatus = pSharedStatus; let storedTeams = window.localStorage.getItem('userTeams'); - if (storedTeams === null || storedTeams.length === 0) { + if (storedTeams === null || storedTeams === "[]" || storedTeams === "") { window.TEAMS = ""; label = NOT_FOUND; } else {