Skip to content

Commit f680679

Browse files
committed
Fix a tab-view crash on Angular projects (iOS).
1 parent e0cb2a2 commit f680679

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tns-core-modules/ui/tab-view/tab-view.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ export class TabViewStyler implements style.Styler {
499499
var tabBar = <UITabBar>v.ios.tabBar;
500500
let currentFont;
501501

502-
if (tabBar.items.count > 0) {
502+
if (tabBar.items && tabBar.items.count > 0) {
503503
let currentAttrs = tabBar.items[0].titleTextAttributesForState(UIControlState.Normal);
504504
if (currentAttrs) {
505505
currentFont = currentAttrs.objectForKey(NSFontAttributeName);
@@ -595,4 +595,4 @@ export class TabViewStyler implements style.Styler {
595595
}
596596
}
597597

598-
TabViewStyler.registerHandlers();
598+
TabViewStyler.registerHandlers();

0 commit comments

Comments
 (0)