Skip to content

Commit

Permalink
Prefer early return
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed Aug 3, 2022
1 parent f3d69cf commit b216e4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/OpacityView.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ class OpacityView extends React.Component {
// If animation doesn't finish because Animation.stop was called
// (e.g. because it was interrupted by a gesture or another animation),
// restart animation so we always make sure the component gets completely shown.
if (!finished) {
this.undim();
if (finished) {
return;
}
this.undim();
});
}

Expand Down

0 comments on commit b216e4d

Please sign in to comment.