mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:28:29 +00:00
refactor: remove redundant spread fallbacks
This commit is contained in:
@@ -462,7 +462,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount> = {
|
||||
if (nextTelegram && Object.keys(nextTelegram).length > 0) {
|
||||
nextCfg.channels = { ...nextCfg.channels, telegram: nextTelegram };
|
||||
} else {
|
||||
const nextChannels = { ...(nextCfg.channels ?? {}) };
|
||||
const nextChannels = { ...nextCfg.channels };
|
||||
delete nextChannels.telegram;
|
||||
if (Object.keys(nextChannels).length > 0) {
|
||||
nextCfg.channels = nextChannels;
|
||||
|
||||
Reference in New Issue
Block a user