Prevent NPE

This commit is contained in:
Daniel Gasienica 2018-04-24 16:12:11 -04:00
parent 96be0df8c7
commit 823a58f98a

View file

@ -104,7 +104,12 @@ export class Lightbox extends React.Component<Props, {}> {
};
private onClose = () => {
this.props.close();
const { close } = this.props;
if (!close) {
return;
}
close();
};
private onKeyUp = (event: KeyboardEvent) => {