mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
oops, actual null check
This commit is contained in:
parent
c23a3fd7fe
commit
fec2e31b41
1 changed files with 3 additions and 1 deletions
|
@ -389,7 +389,9 @@ function _persistCredentialsToLocalStorage(credentials) {
|
|||
* Logs the current session out and transitions to the logged-out state
|
||||
*/
|
||||
export function logout() {
|
||||
if (MatrixClientPeg.get() && MatrixClientPeg.get().isGuest()) {
|
||||
if (!MatrixClientPeg.get()) return
|
||||
|
||||
if (MatrixClientPeg.get().isGuest()) {
|
||||
// logout doesn't work for guest sessions
|
||||
// Also we sometimes want to re-log in a guest session
|
||||
// if we abort the login
|
||||
|
|
Loading…
Reference in a new issue