refactor: remove redundant spread fallbacks

This commit is contained in:
Peter Steinberger
2026-01-13 07:29:18 +00:00
parent 3eb48cbea7
commit fcac2464e6
4 changed files with 4 additions and 7 deletions

View File

@@ -106,10 +106,7 @@ export function deleteAccountFromConfigSection(params: {
} as ClawdbotConfig;
}
const nextChannels = { ...(params.cfg.channels ?? {}) } as Record<
string,
unknown
>;
const nextChannels = { ...params.cfg.channels } as Record<string, unknown>;
delete nextChannels[params.sectionKey];
const nextCfg = { ...params.cfg } as ClawdbotConfig;
if (Object.keys(nextChannels).length > 0) {