Guard against null broadcaster. Hopefully addresses #635

This commit is contained in:
Gabe Kangas 2021-01-30 12:02:03 -08:00
parent b37b57feda
commit 29e598d248

View file

@ -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 ? (
<img src="/thumbnail.jpg" className={adminStyles.onlineCurrentThumb} alt="current thumbnail" />
) : null;