diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 5aad0fae36..e899ec6ad8 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -270,7 +270,9 @@ export function setLoggedIn(credentials) { if (rtsClient) { rtsClient.login(credentials.userId).then((body) => { - localStorage.setItem("mx_team_token", body.team_token); + if (body.team_token) { + localStorage.setItem("mx_team_token", body.team_token); + } }, (err) =>{ console.error( "Failed to get team token on login, not persisting to localStorage",