diff --git a/src/commands/health.snapshot.test.ts b/src/commands/health.snapshot.test.ts index e298695effc..5db59e8f5b8 100644 --- a/src/commands/health.snapshot.test.ts +++ b/src/commands/health.snapshot.test.ts @@ -95,7 +95,12 @@ function getTelegramChannelConfig(cfg: Record) { function listTelegramAccountIdsForTest(cfg: Record): string[] { const telegram = getTelegramChannelConfig(cfg); const accounts = telegram.accounts as Record | undefined; - const ids = Object.keys(accounts ?? {}).filter(Boolean); + const ids: string[] = []; + for (const accountId of Object.keys(accounts ?? {})) { + if (accountId) { + ids.push(accountId); + } + } return ids.length > 0 ? ids : ["default"]; }