mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
Merge branch 'master' into vector
This commit is contained in:
commit
50edc619af
2 changed files with 12 additions and 7 deletions
|
@ -78,9 +78,9 @@ module.exports = {
|
|||
logged_in: false,
|
||||
ready: false
|
||||
});
|
||||
localStorage.removeItem("mx_hs_url");
|
||||
localStorage.removeItem("mx_user_id");
|
||||
localStorage.removeItem("mx_access_token");
|
||||
if (window.localStorage) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
Notifier.stop();
|
||||
MatrixClientPeg.get().removeAllListeners();
|
||||
MatrixClientPeg.replace(null);
|
||||
|
|
|
@ -82,10 +82,15 @@ module.exports = {
|
|||
}));
|
||||
var localStorage = window.localStorage;
|
||||
if (localStorage) {
|
||||
try {
|
||||
localStorage.clear();
|
||||
localStorage.setItem("mx_hs_url", that.state.hs_url);
|
||||
localStorage.setItem("mx_is_url", that.state.is_url);
|
||||
localStorage.setItem("mx_user_id", data.user_id);
|
||||
localStorage.setItem("mx_access_token", data.access_token);
|
||||
} catch (e) {
|
||||
console.warn("Error using local storage: can't persist session!");
|
||||
}
|
||||
} else {
|
||||
console.warn("No local storage available: can't persist session!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue