Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(Modal): fix modal close immediately unmounted
  • Loading branch information
TheSharpieOne committed Feb 25, 2020
1 parent 66754d4 commit c8def29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Modal.js
Expand Up @@ -153,7 +153,7 @@ class Modal extends React.Component {

if (this._element) {
this.destroy();
if (this.props.isOpen) {
if (this.props.isOpen || this.state.isOpen) {
this.close();
}
}
Expand Down

0 comments on commit c8def29

Please sign in to comment.