File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ class Animation extends PureComponent {
9
9
componentDidMount ( ) {
10
10
this . loadAnimation ( this . props ) ;
11
11
12
- if ( typeof this . props . progress === 'object' &&
13
- this . props . progress . _listeners ) {
14
-
12
+ if ( typeof this . props . progress === 'object' && this . props . progress . _listeners ) {
15
13
this . props . progress . addListener ( ( progress ) => {
16
14
const { value } = progress ;
17
15
let frame = value / ( 1 / this . anim . getDuration ( true ) ) ;
@@ -21,9 +19,8 @@ class Animation extends PureComponent {
21
19
}
22
20
23
21
componentWillUnmount ( ) {
24
- if ( typeof this . props . progress === 'object' &&
25
- this . props . progress . _listeners ) {
26
- this . props . progress . removeAllListeners ( ) ;
22
+ if ( typeof this . props . progress === 'object' && this . props . progress . _listeners ) {
23
+ this . props . progress . removeAllListeners ( ) ;
27
24
}
28
25
}
29
26
You can’t perform that action at this time.
0 commit comments