Prevent NPE
This commit is contained in:
parent
96be0df8c7
commit
823a58f98a
1 changed files with 6 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue