mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-24 13:57:27 -05:00
Fix logout on deleted accounts
This commit is contained in:
parent
c2c9bbe555
commit
7f5bc2f57c
@ -84,6 +84,7 @@ export const login = async (
|
||||
export const logout = async () => {
|
||||
const accounts = readAccounts();
|
||||
const account = accounts.find((x) => x.selected);
|
||||
removeAccounts((x) => x.selected);
|
||||
if (account) {
|
||||
await queryFn({
|
||||
method: "DELETE",
|
||||
@ -92,7 +93,6 @@ export const logout = async () => {
|
||||
parser: null,
|
||||
});
|
||||
}
|
||||
removeAccounts((x) => x.selected);
|
||||
};
|
||||
|
||||
export const deleteAccount = async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user