Browse Source

Fixed crash when no event to display

keplyx 4 years ago
parent
commit
30c1c9c5bf
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      components/PreviewEventDashboardItem.js

+ 1
- 1
components/PreviewEventDashboardItem.js View File

@@ -10,7 +10,7 @@ import PlanningEventManager from "../utils/PlanningEventManager";
10 10
 
11 11
 function PreviewEventDashboardItem(props) {
12 12
     const {colors} = props.theme;
13
-    const isEmpty = PlanningEventManager.isDescriptionEmpty(props.event['description']);
13
+    const isEmpty = props.event === undefined ? true : PlanningEventManager.isDescriptionEmpty(props.event['description']);
14 14
     if (props.event !== undefined && props.event !== null) {
15 15
         const hasImage = props.event['logo'] !== '' && props.event['logo'] !== null;
16 16
         const getImage = () => <Avatar.Image

Loading…
Cancel
Save