mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(tabs): do not emit tab change if selectedTab undefined
This commit is contained in:
@@ -34,9 +34,11 @@ export class TabBar implements ComponentInterface {
|
||||
@Prop() selectedTab?: string;
|
||||
@Watch('selectedTab')
|
||||
selectedTabChanged() {
|
||||
this.ionTabBarChanged.emit({
|
||||
tab: this.selectedTab
|
||||
});
|
||||
if (this.selectedTab !== undefined) {
|
||||
this.ionTabBarChanged.emit({
|
||||
tab: this.selectedTab
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user