diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 42e2ad8ded..70ff87eab8 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -914,15 +914,15 @@ name={$i18n.t('Channels')} chevron={false} dragAndDrop={false} - onAdd={async () => { - if ($user?.role === 'admin') { - await tick(); + onAdd={$user?.role === 'admin' + ? async () => { + await tick(); - setTimeout(() => { - showCreateChannel = true; - }, 0); - } - }} + setTimeout(() => { + showCreateChannel = true; + }, 0); + } + : null} onAddLabel={$i18n.t('Create Channel')} > {#each $channels as channel}