fix: Improve account search logic in disableBannedAccount function

This commit is contained in:
2026-01-02 19:35:44 +01:00
parent d7a66847c7
commit ab532c9370

View File

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