react-observable-mixin
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -73,2 +73,4 @@ 'use strict'; | ||
observablesSubscribeOnNext: function observablesSubscribeOnNext(state) { | ||
if (!this.observablesSubscription) return; | ||
if (this.componentWillReceiveStateFromObservables) this.componentWillReceiveStateFromObservables(state); | ||
@@ -87,2 +89,4 @@ | ||
observablesSubscribeOnError: function observablesSubscribeOnError(error) { | ||
if (!this.observablesSubscription) return; | ||
if (this.componentWillReceiveErrorFromObservables) this.componentWillReceiveErrorFromObservables(error); | ||
@@ -120,5 +124,8 @@ }, | ||
unsubscribeFromObservables: function unsubscribeFromObservables() { | ||
this.observablesSubscription.dispose(); | ||
if (this.observablesSubscription) { | ||
this.observablesSubscription.dispose(); | ||
this.observablesSubscription = null; | ||
} | ||
} | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "react-observable-mixin", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Container like observable mixin for ReactJS.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -62,2 +62,5 @@ import Rx from 'rx'; | ||
observablesSubscribeOnNext(state) { | ||
if (!this.observablesSubscription) | ||
return; | ||
if (this.componentWillReceiveStateFromObservables) | ||
@@ -77,2 +80,5 @@ this.componentWillReceiveStateFromObservables(state); | ||
observablesSubscribeOnError(error) { | ||
if (!this.observablesSubscription) | ||
return; | ||
if (this.componentWillReceiveErrorFromObservables) | ||
@@ -109,4 +115,7 @@ this.componentWillReceiveErrorFromObservables(error); | ||
unsubscribeFromObservables() { | ||
this.observablesSubscription.dispose(); | ||
if (this.observablesSubscription) { | ||
this.observablesSubscription.dispose(); | ||
this.observablesSubscription = null; | ||
} | ||
} | ||
}; |
Sorry, the diff of this file is too big to display
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
1197961
29648