From 631fa3ebef186aee39ec8150382314215b37a9e4 Mon Sep 17 00:00:00 2001 From: AlexKVal Date: Fri, 10 Apr 2015 20:12:39 +0300 Subject: [PATCH] Refactor code using `onAnimateOutEnd`. Now type checking for `onAnimateOutEnd` is done by `React.propTypes` and we safely can simplify `if` statement. --- src/TabPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TabPane.js b/src/TabPane.js index 6f2c8481e1..ed3d59a1e1 100644 --- a/src/TabPane.js +++ b/src/TabPane.js @@ -62,7 +62,7 @@ const TabPane = React.createClass({ animateOut: false }); - if (typeof this.props.onAnimateOutEnd === 'function') { + if (this.props.onAnimateOutEnd) { this.props.onAnimateOutEnd(); } }