Skip to content

Commit

Permalink
fix(Modal): check this.props.toggle exists before using it (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
defue authored and TheSharpieOne committed Nov 21, 2017
1 parent dd2512a commit 80c0cde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ class Modal extends React.Component {

show() {
if (this._dialog) {
this.props.toggle(true);
if (this.props.toggle) {
this.props.toggle(true);
}
return;
}
const classes = document.body.className;
Expand Down

0 comments on commit 80c0cde

Please sign in to comment.