fix(web): scope Suspense to page body; guard formatConfig against null config
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,7 @@ const EMPTY_FORM: ChannelForm = { type: "telegram", chatId: "", botToken: "", ur
|
||||
// (Object.entries по всему config печатал бы любое поле, включая случайно
|
||||
// сохранённый секрет).
|
||||
function formatConfig(type: string, config: object): string {
|
||||
const c = config as Record<string, unknown>
|
||||
const c = (config ?? {}) as Record<string, unknown>
|
||||
if (type === "telegram") return c.chat_id ? `chat_id: ${String(c.chat_id)}` : ""
|
||||
if (type === "webhook") return c.url ? `url: ${String(c.url)}` : ""
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user