Skip to content

Commit

Permalink
animation start/stop bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Jul 31, 2018
1 parent 23e7c94 commit 0e50619
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/containers/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,21 @@ export default class Loading extends React.PureComponent {
}

componentWillUnmount() {
this.opacityAnimation.stop();
this.scaleAnimation.stop();
if (this.opacityAnimation && this.opacityAnimation.stop) {
this.opacityAnimation.stop();
}
if (this.scaleAnimation && this.scaleAnimation.stop) {
this.scaleAnimation.stop();
}
}

startAnimations() {
this.opacityAnimation.start();
this.scaleAnimation.start();
if (this.opacityAnimation && this.opacityAnimation.start) {
this.opacityAnimation.start();
}
if (this.scaleAnimation && this.scaleAnimation.start) {
this.scaleAnimation.start();
}
}

render() {
Expand Down

0 comments on commit 0e50619

Please sign in to comment.