Skip to content

Commit

Permalink
Update Modal.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bertho-zero committed Apr 16, 2019
1 parent a2838bb commit 6ccb9b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class Modal extends Component {
removePortal = () => {
!isReact16 && ReactDOM.unmountComponentAtNode(this.node);
const parent = getParentElement(this.props.parentSelector);
parent.removeChild(this.node);
parent && parent.removeChild(this.node);
};

portalRef = ref => {
Expand Down

0 comments on commit 6ccb9b0

Please sign in to comment.