react-input-message
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -26,3 +26,4 @@ 'use strict'; | ||
MessageListener.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) { | ||
MessageListener.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState, nextContext) { | ||
if (!(nextContext || {}).messageContainer) return true; | ||
if (!this.state && nextState) return true; | ||
@@ -40,9 +41,11 @@ if (this.state && !nextState) return true; | ||
this.unsubscribe = container.subscribe(function (getMessages) { | ||
_this.setState(_this._getValidationState(getMessages)); | ||
}); | ||
if (container) { | ||
this.unsubscribe = container.subscribe(function (getMessages) { | ||
_this.setState(_this._getValidationState(getMessages)); | ||
}); | ||
} | ||
}; | ||
MessageListener.prototype.componentWillUnmount = function componentWillUnmount() { | ||
this.unsubscribe(); | ||
this.unsubscribe && this.unsubscribe(); | ||
}; | ||
@@ -49,0 +52,0 @@ |
{ | ||
"name": "react-input-message", | ||
"description": "unopinionated form input annotation", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "git://github.com/jquense/react-input-message.git" |
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
22687
470