From c374f0017947e6daf15a7052c0b871b9d8dbabd8 Mon Sep 17 00:00:00 2001 From: Mario Nebl Date: Sun, 15 Jul 2018 10:07:56 +0200 Subject: [PATCH] fix: reflect loose slot typings --- src/container/element-list/element-slot-container.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/container/element-list/element-slot-container.tsx b/src/container/element-list/element-slot-container.tsx index 3739a321d..2a15484d4 100644 --- a/src/container/element-list/element-slot-container.tsx +++ b/src/container/element-list/element-slot-container.tsx @@ -14,8 +14,9 @@ export interface ElementSlotContainerProps { export class ElementSlotContainer extends React.Component { public render(): JSX.Element | null { const props = this.props as ElementSlotContainerProps & { store: ViewStore }; + const slot = props.content.getSlot(); - if (props.content.getSlot().getHidden()) { + if (!slot || slot.getHidden()) { return null; } @@ -25,7 +26,7 @@ export class ElementSlotContainer extends React.Component {props.content .getElements()