Skip to content

Commit

Permalink
Merge pull request GeekyAnts#886 from smmoosavi/remove-json
Browse files Browse the repository at this point in the history
use _.isEqual instead of JSON.stringify
  • Loading branch information
shivrajkumar authored May 30, 2017
2 parents 184feca + a913ef4 commit 0ea2f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/basic/Tabs/ScrollableTabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const ScrollableTabBar = React.createClass({

componentWillReceiveProps(nextProps) {
// If the tabs change, force the width of the tabs container to be recalculated
if (JSON.stringify(this.props.tabs) !== JSON.stringify(nextProps.tabs) && this.state._containerWidth) {
if (!_.isEqual(this.props.tabs, nextProps.tabs) && this.state._containerWidth) {
this.setState({ _containerWidth: null, });
}
},
Expand Down

0 comments on commit 0ea2f5d

Please sign in to comment.