react-smooth
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -0,1 +1,6 @@ | ||
0.1.14 / 2016-10-28 | ||
================== | ||
* fix: judge isMounted | ||
0.1.13 / 2016-10-27 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -109,2 +109,4 @@ 'use strict'; | ||
this.isMounted = true; | ||
if (!isActive || !canBegin) { | ||
@@ -167,2 +169,4 @@ return; | ||
value: function componentWillUnmount() { | ||
this.isMounted = false; | ||
if (this.unSubscribe) { | ||
@@ -296,5 +300,7 @@ this.unSubscribe(); | ||
value: function changeStyle(style) { | ||
this.setState({ | ||
style: style | ||
}); | ||
if (this.isMounted) { | ||
this.setState({ | ||
style: style | ||
}); | ||
} | ||
} | ||
@@ -301,0 +307,0 @@ }, { |
@@ -109,2 +109,4 @@ 'use strict'; | ||
this.isMounted = true; | ||
if (!isActive || !canBegin) { | ||
@@ -167,2 +169,4 @@ return; | ||
value: function componentWillUnmount() { | ||
this.isMounted = false; | ||
if (this.unSubscribe) { | ||
@@ -296,5 +300,7 @@ this.unSubscribe(); | ||
value: function changeStyle(style) { | ||
this.setState({ | ||
style: style | ||
}); | ||
if (this.isMounted) { | ||
this.setState({ | ||
style: style | ||
}); | ||
} | ||
} | ||
@@ -301,0 +307,0 @@ }, { |
{ | ||
"name": "react-smooth", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "react animation library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
@@ -96,2 +96,4 @@ import React, { Component, PropTypes, cloneElement, Children } from 'react'; | ||
this.isMounted = true; | ||
if (!isActive || !canBegin) { | ||
@@ -149,2 +151,4 @@ return; | ||
componentWillUnmount() { | ||
this.isMounted = false; | ||
if (this.unSubscribe) { | ||
@@ -271,5 +275,7 @@ this.unSubscribe(); | ||
changeStyle(style) { | ||
this.setState({ | ||
style, | ||
}); | ||
if (this.isMounted) { | ||
this.setState({ | ||
style, | ||
}); | ||
} | ||
} | ||
@@ -276,0 +282,0 @@ |
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
561035
12027