Fix undefined in client startup

This commit is contained in:
Tainan Felipe 2019-06-21 14:39:12 -03:00
parent d8f891408d
commit 8ed29dfce5
2 changed files with 7 additions and 1 deletions

View File

@ -49,6 +49,7 @@ const defaultProps = {
disabled: false,
},
dismiss: {
callback: () => {},
disabled: false,
},
preventClosing: false,

View File

@ -37,7 +37,12 @@ class ModalSimple extends Component {
}
handleDismiss() {
this.props.modalHide(this.props.dismiss.callback);
const {
modalHide,
dismiss,
} = this.props;
if (!dismiss && !modalHide) return;
modalHide(dismiss.callback);
}
render() {