diff --git a/src/components/Modal.js b/src/components/Modal.js index b8246a64..34d871c0 100644 --- a/src/components/Modal.js +++ b/src/components/Modal.js @@ -134,15 +134,15 @@ class Modal extends Component { this.node.className = portalClassName; } - // Stop unnecessary renders if modal is remaining closed - if (!prevProps.isOpen && !isOpen) return; - const { prevParent, nextParent } = snapshot; if (nextParent !== prevParent) { prevParent.removeChild(this.node); nextParent.appendChild(this.node); } + // Stop unnecessary renders if modal is remaining closed + if (!prevProps.isOpen && !isOpen) return; + !isReact16 && this.renderPortal(this.props); }