From 543ef3030fd572ea7b5f60ddb7e0b9be62f92563 Mon Sep 17 00:00:00 2001 From: jljsj33 Date: Wed, 11 Apr 2018 21:09:54 +0800 Subject: [PATCH] fix state children is null --- src/QueueAnim.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QueueAnim.jsx b/src/QueueAnim.jsx index be7f358..f95dcf9 100644 --- a/src/QueueAnim.jsx +++ b/src/QueueAnim.jsx @@ -95,7 +95,7 @@ class QueueAnim extends React.Component { * 如果 state.children 里还有元素,元素还在动画,当前子级加回在出场的子级; */ const leaveChild = this.state.children.filter(item => - this.keysToLeave.indexOf(item.key) >= 0 + item && this.keysToLeave.indexOf(item.key) >= 0 ); currentChildren = mergeChildren(currentChildren, leaveChild); }