fix: log into next stored account on logout
This commit is contained in:
parent
8e241b3435
commit
ba1f8ef063
1 changed files with 12 additions and 6 deletions
|
@ -24,13 +24,19 @@
|
|||
res.message,
|
||||
]);
|
||||
|
||||
delete self.LOGIN_ACCOUNT_TOKENS[res.payload];
|
||||
self.set_login_account_tokens(self.LOGIN_ACCOUNT_TOKENS);
|
||||
|
||||
if (res.ok) {
|
||||
setTimeout(() => {
|
||||
window.location.href = "/";
|
||||
}, 150);
|
||||
delete self.LOGIN_ACCOUNT_TOKENS[res.payload];
|
||||
self.set_login_account_tokens(self.LOGIN_ACCOUNT_TOKENS);
|
||||
|
||||
const next = Object.entries(self.LOGIN_ACCOUNT_TOKENS)[0];
|
||||
|
||||
if (next) {
|
||||
self.login(next[0]);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
window.location.href = "/";
|
||||
}, 150);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue