Skip to content

Commit 3d2129b

Browse files
committed
fix getDerivedStateFromProps setState
1 parent 9ceefd1 commit 3d2129b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-tween-one",
3-
"version": "2.6.1",
3+
"version": "2.6.2",
44
"description": "tween-one anim component for react",
55
"keywords": [
66
"react",

src/TweenOneGroup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TweenOneGroup extends Component {
2020
const nextState = {
2121
prevProps: props,
2222
};
23-
if (prevProps) {
23+
if (prevProps && props !== prevProps) {
2424
const nextChildren = toArrayChildren(props.children);
2525
if (Object.keys($self.isTween).length && !props.exclusive) {
2626
$self.animQueue.push(nextChildren);

0 commit comments

Comments
 (0)