Skip to content

Commit af63f9d

Browse files
committed
unmount reset data
1 parent 24cd79d commit af63f9d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/QueueAnim.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,14 @@ class QueueAnim extends React.Component {
195195

196196
componentWillUnmount() {
197197
[].concat(this.keysToEnter, this.keysToLeave, this.keysAnimating).forEach(key =>
198-
velocity(findDOMNode(this.refs[key]), 'stop')
198+
this.refs[key] && velocity(findDOMNode(this.refs[key]), 'stop')
199199
);
200200
Object.keys(this.placeholderTimeoutIds).forEach(key => {
201201
clearTimeout(this.placeholderTimeoutIds[key]);
202202
});
203+
this.keysToEnter = [];
204+
this.keysToLeave = [];
205+
this.keysAnimating = [];
203206
}
204207

205208
getVelocityConfig(index, ...args) {

0 commit comments

Comments
 (0)