fix: log into next stored account on logout

This commit is contained in:
trisua 2025-05-10 22:40:32 -04:00
parent 8e241b3435
commit ba1f8ef063

View file

@ -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);
}
}
});
});