From 29e598d24892c329ffb71a8440896a953a3eec61 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 30 Jan 2021 12:02:03 -0800 Subject: [PATCH] Guard against null broadcaster. Hopefully addresses #635 --- web/pages/components/main-layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pages/components/main-layout.tsx b/web/pages/components/main-layout.tsx index 23b2ccbe4..92f906f5e 100644 --- a/web/pages/components/main-layout.tsx +++ b/web/pages/components/main-layout.tsx @@ -42,7 +42,7 @@ export default function MainLayout(props) { const { SubMenu } = Menu; // status indicator items - const streamDurationString = online ? parseSecondsToDurationString(differenceInSeconds(new Date(), new Date(broadcaster.time))) : ""; + const streamDurationString = broadcaster ? parseSecondsToDurationString(differenceInSeconds(new Date(), new Date(broadcaster.time))) : ""; const currentThumbnail = online ? ( current thumbnail ) : null;