@@ -438,7 +438,7 @@ export default class ScrollableTabView extends React.Component {
438438 const pluginName = packagejson . name ;
439439 const msg = `${ pluginName } : ${ message || ' --- ' } ` ;
440440 console [ level ] ( msg ) ;
441- if ( errorToThrow ) throw new Error ( msg ) ;
441+ if ( errorToThrow && level == CONSOLE_LEVEL . ERROR ) throw new Error ( msg ) ;
442442 }
443443
444444 _errorProps ( propName , level ) {
@@ -480,12 +480,12 @@ export default class ScrollableTabView extends React.Component {
480480 horizontal = { true }
481481 >
482482 { this . tabs . map ( ( tab , index ) => this . _renderTab ( { item : tab , index } ) ) }
483- { tabsEnableAnimated && this . _renderAnimatedTabUnderline ( ) }
483+ { tabsEnableAnimated && this . state . checkedIndex !== null && this . _renderAnimatedTabUnderline ( ) }
484484 </ ScrollView >
485485 ) : (
486486 < View style = { _tabsStyle } >
487487 { this . tabs . map ( ( tab , index ) => this . _renderTab ( { item : tab , index } ) ) }
488- { tabsEnableAnimated && this . _renderAnimatedTabUnderline ( ) }
488+ { tabsEnableAnimated && this . state . checkedIndex !== null && this . _renderAnimatedTabUnderline ( ) }
489489 </ View >
490490 ) )
491491 ) ;
@@ -520,6 +520,8 @@ export default class ScrollableTabView extends React.Component {
520520 }
521521
522522 _onTabviewChange ( isCarouselScroll , index ) {
523+ if ( ! this . stacks . length ) return ;
524+ if ( ! this . stacks [ index ] ) return ;
523525 const { enableCachePage, toHeaderOnTab, toTabsOnTab, onTabviewChanged } = this . props ;
524526 if ( index == this . state . checkedIndex ) {
525527 if ( ! isCarouselScroll && toHeaderOnTab ) return this . _scrollTo ( - this . layoutHeight [ 'header' ] ) ;
0 commit comments