Simplify redundant conditional in handleFetchChannels

Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-05 22:05:50 +00:00
parent 8d508d5a86
commit 651e9e6bdd

View File

@@ -85,10 +85,7 @@ export function ChannelsTab({ channels, globalDestination, accounts }: ChannelsT
}; };
const handleFetchChannels = () => { const handleFetchChannels = () => {
if (authenticatedAccounts.length === 1) { if (authenticatedAccounts.length > 0) {
setFetchChannelsAccountId(authenticatedAccounts[0].id);
} else if (authenticatedAccounts.length > 1) {
// Use the first authenticated account by default
setFetchChannelsAccountId(authenticatedAccounts[0].id); setFetchChannelsAccountId(authenticatedAccounts[0].id);
} else { } else {
toast.error("No authenticated accounts available. Add and authenticate an account first."); toast.error("No authenticated accounts available. Add and authenticate an account first.");