fix: 💨

This commit is contained in:
codytseng
2025-06-09 22:47:12 +08:00
parent f7dccde746
commit d81dc3fe4e

View File

@@ -171,9 +171,7 @@ class LocalStorageService {
} }
addAccount(account: TAccount) { addAccount(account: TAccount) {
if (this.accounts.find((act) => isSameAccount(act, account))) { this.accounts = this.accounts.filter((act) => !isSameAccount(act, account))
return
}
this.accounts.push(account) this.accounts.push(account)
window.localStorage.setItem(StorageKey.ACCOUNTS, JSON.stringify(this.accounts)) window.localStorage.setItem(StorageKey.ACCOUNTS, JSON.stringify(this.accounts))
return account return account