From 30c1c9c5bf39f767f8cccd267a4f12ae8083032e Mon Sep 17 00:00:00 2001 From: keplyx Date: Wed, 11 Mar 2020 19:55:20 +0100 Subject: [PATCH] Fixed crash when no event to display --- components/PreviewEventDashboardItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/PreviewEventDashboardItem.js b/components/PreviewEventDashboardItem.js index 83cdc8b..37b0845 100644 --- a/components/PreviewEventDashboardItem.js +++ b/components/PreviewEventDashboardItem.js @@ -10,7 +10,7 @@ import PlanningEventManager from "../utils/PlanningEventManager"; function PreviewEventDashboardItem(props) { const {colors} = props.theme; - const isEmpty = PlanningEventManager.isDescriptionEmpty(props.event['description']); + const isEmpty = props.event === undefined ? true : PlanningEventManager.isDescriptionEmpty(props.event['description']); if (props.event !== undefined && props.event !== null) { const hasImage = props.event['logo'] !== '' && props.event['logo'] !== null; const getImage = () =>