Skip to content

Commit

Permalink
Refactor code using onAnimateOutEnd.
Browse files Browse the repository at this point in the history
Now type checking for `onAnimateOutEnd` is done by `React.propTypes`
and we safely can simplify `if` statement.
  • Loading branch information
AlexKVal committed Apr 10, 2015
1 parent d5aa944 commit 631fa3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TabPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TabPane = React.createClass({
animateOut: false
});

if (typeof this.props.onAnimateOutEnd === 'function') {
if (this.props.onAnimateOutEnd) {
this.props.onAnimateOutEnd();
}
}
Expand Down

0 comments on commit 631fa3e

Please sign in to comment.