react-notification
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -138,7 +138,11 @@ 'use strict'; | ||
Notification.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { | ||
if (nextProps.onDismiss && nextProps.isActive) { | ||
setTimeout(nextProps.onDismiss, nextProps.dismissAfter); | ||
if (nextProps.onDismiss && nextProps.isActive && !this.props.isActive) { | ||
this.dismissTimeout = setTimeout(nextProps.onDismiss, nextProps.dismissAfter); | ||
} | ||
}; | ||
Notification.prototype.componentWillUnmount = function componentWillUnmount() { | ||
clearTimeout(this.dismissTimeout); | ||
}; | ||
/* | ||
@@ -145,0 +149,0 @@ * @description Dynamically get the styles for the bar. |
{ | ||
"name": "react-notification", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Snackbar style notification component for React.", | ||
@@ -5,0 +5,0 @@ "main": "dist/notification.js", |
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
125891
383