diff --git a/ui/src/ui/views/channels.shared.ts b/ui/src/ui/views/channels.shared.ts index 5bd5755ea1c..7838d3966a9 100644 --- a/ui/src/ui/views/channels.shared.ts +++ b/ui/src/ui/views/channels.shared.ts @@ -29,10 +29,9 @@ export function resolveChannelConfigured(key: ChannelKey, props: ChannelsProps): const accounts = snapshot?.channelAccounts?.[key] ?? []; const defaultAccountId = snapshot?.channelDefaultAccountId?.[key]; - const defaultAccount = - (defaultAccountId - ? accounts.find((account) => account.accountId === defaultAccountId) - : undefined) ?? accounts[0]; + const defaultAccount = defaultAccountId + ? accounts.find((account) => account.accountId === defaultAccountId) + : accounts[0]; if (typeof defaultAccount?.configured === "boolean") { return defaultAccount.configured;