Skip to content

Commit

Permalink
Removed unnecessary .getNode() method call on referenced scrollView (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
ejdigby authored May 23, 2020
1 parent 510111a commit 1371236
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ const ScrollableTabView = createReactClass({
if (Platform.OS === 'ios') {
const offset = pageNumber * this.state.containerWidth;
if (this.scrollView) {
this.scrollView.getNode().scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
this.scrollView.scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
}
} else {
if (this.scrollView) {
if (this.props.scrollWithoutAnimation) {
this.scrollView.getNode().setPageWithoutAnimation(pageNumber);
this.scrollView.setPageWithoutAnimation(pageNumber);
} else {
this.scrollView.getNode().setPage(pageNumber);
this.scrollView.setPage(pageNumber);
}
}
}
Expand Down

0 comments on commit 1371236

Please sign in to comment.