From ad2a7d621249596d36b5044d15942d15728334a5 Mon Sep 17 00:00:00 2001 From: xuwenyang Date: Mon, 15 Jul 2019 22:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=20=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=BA=95=E6=A0=8Ftab=E2=80=98=E9=A6=96=E9=A1=B5=E2=80=99?= =?UTF-8?q?=EF=BC=8C=E2=80=98=E5=85=B3=E6=B3=A8=E2=80=99=E5=8A=A0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=BA=E7=A9=BA=E5=80=BC=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/FollowPage.js | 4 +++- src/page/HomePage.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/page/FollowPage.js b/src/page/FollowPage.js index 494a98e..342c632 100644 --- a/src/page/FollowPage.js +++ b/src/page/FollowPage.js @@ -56,7 +56,9 @@ export default class FollowPage extends Component { this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener( ({ selectedTabIndex, unselectedTabIndex }) => { if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 1) { - this.diaryList.scrollToTop(); + if(this.diaryList) { + this.diaryList.scrollToTop(); + } } } ); diff --git a/src/page/HomePage.js b/src/page/HomePage.js index 404b684..d9f2f96 100644 --- a/src/page/HomePage.js +++ b/src/page/HomePage.js @@ -54,7 +54,9 @@ export default class HomePage extends Component { this.bottomTabEventListener = Navigation.events().registerBottomTabSelectedListener( ({ selectedTabIndex, unselectedTabIndex }) => { if(selectedTabIndex == unselectedTabIndex && selectedTabIndex == 0) { - this.diaryList.scrollToTop(); + if(this.diaryList) { + this.diaryList.scrollToTop(); + } } } );