Skip to content

Commit fd3ba74

Browse files
committed
fix(tabs): prevent crash if nativeView not created yet
1 parent c58f7cf commit fd3ba74

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tabs/tabs.android.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ export class Tabs extends TabsBase {
482482
}
483483
onSelectedIndexChanged(oldIndex: number, newIndex: number) {
484484
const tabBarImplementation = (this._tabsBar as unknown) as PositionChanger;
485-
tabBarImplementation.onSelectedPositionChange(oldIndex, newIndex);
485+
if (tabBarImplementation) {
486+
tabBarImplementation.onSelectedPositionChange(oldIndex, newIndex);
487+
}
486488
super.onSelectedIndexChanged(oldIndex, newIndex);
487489
}
488490

0 commit comments

Comments
 (0)