From ab532c93708610a167e433bd277fc67e336e18da Mon Sep 17 00:00:00 2001 From: LightZirconite Date: Fri, 2 Jan 2026 19:35:44 +0100 Subject: [PATCH] fix: Improve account search logic in disableBannedAccount function --- src/util/state/AccountDisabler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/state/AccountDisabler.ts b/src/util/state/AccountDisabler.ts index dffeaff..4e751d5 100644 --- a/src/util/state/AccountDisabler.ts +++ b/src/util/state/AccountDisabler.ts @@ -46,7 +46,7 @@ export async function disableBannedAccount(email: string, reason: string): Promi } // Find the account - const accountIndex = accountsArray.findIndex((acc: unknown) => acc.email === email) + const accountIndex = accountsArray.findIndex((acc: any) => acc && typeof acc === 'object' && acc.email === email) if (accountIndex === -1) { throw new Error(`Account ${email} not found in accounts.jsonc`) }