react-portal
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -105,5 +105,3 @@ 'use strict'; | ||
if (this.state.active) { | ||
this.closePortal(); | ||
} | ||
this.closePortal(); | ||
} | ||
@@ -175,9 +173,11 @@ }, { | ||
if (this.props.beforeClose) { | ||
this.props.beforeClose(this.node, resetPortalState); | ||
} else { | ||
resetPortalState(this.node); | ||
if (this.state.active) { | ||
if (this.props.beforeClose) { | ||
this.props.beforeClose(this.node, resetPortalState); | ||
} else { | ||
resetPortalState(); | ||
} | ||
this.props.onClose(); | ||
} | ||
this.props.onClose(); | ||
} | ||
@@ -232,1 +232,2 @@ }, { | ||
}; | ||
module.exports = exports['default']; |
@@ -69,5 +69,3 @@ import React from 'react'; | ||
if (this.state.active) { | ||
this.closePortal(); | ||
} | ||
this.closePortal(); | ||
} | ||
@@ -125,9 +123,11 @@ | ||
if (this.props.beforeClose) { | ||
this.props.beforeClose(this.node, resetPortalState); | ||
} else { | ||
resetPortalState(this.node); | ||
if (this.state.active) { | ||
if (this.props.beforeClose) { | ||
this.props.beforeClose(this.node, resetPortalState); | ||
} else { | ||
resetPortalState(); | ||
} | ||
this.props.onClose(); | ||
} | ||
this.props.onClose(); | ||
} | ||
@@ -134,0 +134,0 @@ |
{ | ||
"name": "react-portal", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "React component for transportation of modals, lightboxes, loading bars... to document.body", | ||
@@ -49,2 +49,3 @@ "main": "build/portal", | ||
"babel-loader": "^6.2.1", | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
"babel-preset-es2015": "^6.3.13", | ||
@@ -51,0 +52,0 @@ "babel-preset-react": "^6.3.13", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1658691
338
23