fix guest login when in a RoomView

pull/21833/head
Matthew Hodgson 2016-09-17 02:19:27 +01:00
parent 671eacaac7
commit 026a2e6c7c
1 changed files with 6 additions and 1 deletions

View File

@ -279,7 +279,12 @@ export function logout() {
// logout doesn't work for guest sessions
// Also we sometimes want to re-log in a guest session
// if we abort the login
onLoggedOut();
// use settimeout to avoid racing with react unmounting components
// which need a valid matrixclientpeg
setTimeout(()=>{
onLoggedOut();
}, 0);
return;
}