Skip to content

Commit aec1784

Browse files
authored
Merge pull request #341 from edusperoni/fix/null-label-on-tabs
fix(tabs): prevent crash when TabStripItem isn't loaded yet
2 parents 672d030 + 301db6f commit aec1784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tabs/tabs.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ export class Tabs extends TabsBase {
693693
const tabItems = new Array<com.nativescript.material.core.TabItemSpec>();
694694
items.forEach((tabStripItem: TabStripItem, i, arr) => {
695695
if (!this._unSelectedItemColor) {
696-
this._unSelectedItemColor = tabStripItem.label.style.color;
696+
this._unSelectedItemColor = tabStripItem.label?.style.color;
697697
}
698698
tabStripItem._index = i;
699699
const tabItemSpec = this.createTabItemSpec(tabStripItem);

0 commit comments

Comments
 (0)