Skip to content
Snippets Groups Projects
react-modal+3.4.4.patch 556 B
diff --git a/node_modules/react-modal/lib/components/ModalPortal.js b/node_modules/react-modal/lib/components/ModalPortal.js
index 1dcab7d..0fa19dc 100644
--- a/node_modules/react-modal/lib/components/ModalPortal.js
+++ b/node_modules/react-modal/lib/components/ModalPortal.js
@@ -286,7 +286,7 @@ var ModalPortal = function (_Component) {
   }, {
     key: "componentWillUnmount",
     value: function componentWillUnmount() {
-      this.afterClose();
+      setTimeout(() => { this.afterClose() }, 0)
       clearTimeout(this.closeTimer);
     }
   }, {