From 2ea3bdec2d7a65f8ceeea84f9e677fb4d2c5e0f3 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Thu, 13 Feb 2025 16:24:48 -0500 Subject: [PATCH] fix: populate teams channel on initial load (#5284) --- .../src/lib/components/InstanceSetting.svelte | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 3081fcd36d..599ca28229 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -422,6 +422,9 @@ [e.target['value']]: '' } } + if (e.target?.['value'] === 'teams_channel') { + fetchTeams() + } }} value={(() => { if (!v) return 'email' @@ -456,15 +459,17 @@ selected={!$values['critical_error_channels'][i]?.teams_channel ?.team_id}>Select team - {#each $values['teams'] as team} - - {/each} + {#if $values['teams']} + {#each $values['teams'] as team} + + {/each} + {/if} {#if $values['critical_error_channels'][i]?.teams_channel?.team_id}