File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -821,14 +821,19 @@ export class BottomNavigation extends TabNavigationBase {
821821 }
822822
823823 public updateAndroidItemAt ( index : number , spec : com . nativescript . material . core . TabItemSpec ) {
824- this . _bottomNavigationBar . updateItemAt ( index , spec ) ;
824+ if ( this . _bottomNavigationBar ) {
825+ this . _bottomNavigationBar . updateItemAt ( index , spec ) ;
826+ }
825827 }
826828
827829 public getTabBarBackgroundColor ( ) : android . graphics . drawable . Drawable {
828830 return this . _bottomNavigationBar . getBackground ( ) ;
829831 }
830832
831833 public setTabBarBackgroundColor ( value : android . graphics . drawable . Drawable | Color ) : void {
834+ if ( ! this . _bottomNavigationBar ) {
835+ return ;
836+ }
832837 if ( value instanceof Color ) {
833838 this . _bottomNavigationBar . setBackgroundColor ( value . android ) ;
834839 } else {
You can’t perform that action at this time.
0 commit comments