Fixed crash when no event to display
This commit is contained in:
父節點
d17a52307f
當前提交
30c1c9c5bf
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
|
@ -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 = () => <Avatar.Image
|
||||
|
|
載入中…
Reference in a new issue