From 981e6f99dcdf0140247056f55969f3dcc0580904 Mon Sep 17 00:00:00 2001 From: Gavin Barron Date: Wed, 3 Jan 2024 17:24:54 -0800 Subject: [PATCH] fix: guard on non-existent result (#2931) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Levert --- .../mgt-teams-channel-picker/mgt-teams-channel-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mgt-components/src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.ts b/packages/mgt-components/src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.ts index d951d309d7..1cf1342671 100644 --- a/packages/mgt-components/src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.ts +++ b/packages/mgt-components/src/components/mgt-teams-channel-picker/mgt-teams-channel-picker.ts @@ -746,7 +746,7 @@ export class MgtTeamsChannelPicker extends MgtTemplatedComponent { for (const team of teams) { const channelsForTeam = responses.get(team.id); // skip over any teams that don't have channels - if (!channelsForTeam.content?.value?.length) continue; + if (!channelsForTeam?.content?.value?.length) continue; this.items.push({ item: team, channels: channelsForTeam.content.value.map(c => ({ item: c }))