From 3d85d857bfe9b47cf7933081b9ab0cfcb2997465 Mon Sep 17 00:00:00 2001 From: Gagan Suie Date: Thu, 11 Jan 2024 15:31:00 -0600 Subject: [PATCH] Fix: race condition videoItems null issue --- src/routes/channel/[channelId]/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/channel/[channelId]/+page.svelte b/src/routes/channel/[channelId]/+page.svelte index e77792c8..5654e78b 100644 --- a/src/routes/channel/[channelId]/+page.svelte +++ b/src/routes/channel/[channelId]/+page.svelte @@ -257,7 +257,7 @@ } else { const activeGuests = parsedMsg.activeGuests if (activeGuests?.length) { - if (channel.videoItems.length) { + if (channel.videoItems?.length) { // for users that are in the channel and new users join // add new users but dont overwrite the existing ones streaming channel.videoItems = activeGuests.map((guest: any) => {