Fix logout on deleted accounts

This commit is contained in:
2025-12-04 13:04:08 +01:00
parent d374193ac2
commit 7b38c12b85

View File

@@ -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 () => {