mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Merge pull request #693 from matrix-org/luke/fix-team-token-undefined
Treat the literal team token string "undefined" as undefined
This commit is contained in:
commit
76f80e9873
1 changed files with 6 additions and 0 deletions
|
@ -217,6 +217,12 @@ module.exports = React.createClass({
|
|||
window.localStorage.getItem('mx_team_token') ||
|
||||
window.sessionStorage.getItem('mx_team_token');
|
||||
|
||||
// Some users have ended up with "undefined" as their local storage team token,
|
||||
// treat that as undefined.
|
||||
if (this._teamToken === "undefined") {
|
||||
this._teamToken = undefined;
|
||||
}
|
||||
|
||||
if (this._teamToken) {
|
||||
console.info(`Team token set to ${this._teamToken}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue