From 7c95c87d26d04cae472348b28bad494701411633 Mon Sep 17 00:00:00 2001 From: Samuli Hakoniemi Date: Thu, 9 Mar 2017 15:55:49 +0700 Subject: [PATCH] Fix checking of scrollTo() This error occurs with Jest and tests won't pass. --- src/TabViewPagerScroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TabViewPagerScroll.js b/src/TabViewPagerScroll.js index f92231e9..e21efe65 100644 --- a/src/TabViewPagerScroll.js +++ b/src/TabViewPagerScroll.js @@ -64,7 +64,7 @@ export default class TabViewPagerScroll extends PureComponent _isMomentumScroll: boolean = false; _scrollTo = (x: number) => { - if (this._scrollView) { + if (this._scrollView && this._scrollView.scrollTo) { this._scrollView.scrollTo({ x, animated: false,