From 5ce04ec136ec294cc51f44a16cb114df5403eea7 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Thu, 14 Apr 2022 17:39:40 -0400 Subject: [PATCH] Fix a soft crash with video rooms --- src/utils/VideoChannelUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/VideoChannelUtils.ts b/src/utils/VideoChannelUtils.ts index d989324ed40..0387f81b8eb 100644 --- a/src/utils/VideoChannelUtils.ts +++ b/src/utils/VideoChannelUtils.ts @@ -42,6 +42,6 @@ export const addVideoChannel = async (roomId: string, roomName: string) => { export const getConnectedMembers = (state: RoomState): RoomMember[] => state.getStateEvents(VIDEO_CHANNEL_MEMBER) // Must have a device connected and still be joined to the room - .filter(e => e.getContent().devices?.length) + .filter(e => e.getContent()?.devices?.length) .map(e => state.getMember(e.getStateKey())) - .filter(member => member.membership === "join"); + .filter(member => member?.membership === "join");