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 {
821
821
}
822
822
823
823
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
+ }
825
827
}
826
828
827
829
public getTabBarBackgroundColor ( ) : android . graphics . drawable . Drawable {
828
830
return this . _bottomNavigationBar . getBackground ( ) ;
829
831
}
830
832
831
833
public setTabBarBackgroundColor ( value : android . graphics . drawable . Drawable | Color ) : void {
834
+ if ( ! this . _bottomNavigationBar ) {
835
+ return ;
836
+ }
832
837
if ( value instanceof Color ) {
833
838
this . _bottomNavigationBar . setBackgroundColor ( value . android ) ;
834
839
} else {
You can’t perform that action at this time.
0 commit comments