Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: reflect loose slot typings
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Sep 10, 2018
1 parent ab1004d commit c374f00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/container/element-list/element-slot-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export interface ElementSlotContainerProps {
export class ElementSlotContainer extends React.Component<ElementSlotContainerProps> {
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;
}

Expand All @@ -25,7 +26,7 @@ export class ElementSlotContainer extends React.Component<ElementSlotContainerPr
description={'Slot'}
open={props.content.getOpen() || props.content.getForcedOpen()}
state={getSlotState(props.content, props.store)}
title={props.content.getSlot().getName()}
title={slot.getName()}
>
{props.content
.getElements()
Expand Down

0 comments on commit c374f00

Please sign in to comment.