Skip to content

Commit

Permalink
scrollview crash fix
Browse files Browse the repository at this point in the history
scrollview crash fix
  • Loading branch information
RajeshCentrica committed Sep 24, 2021
1 parent c0c9273 commit 2887068
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 2887068

Please sign in to comment.