fix(angular): lint issue

This commit is contained in:
Manu Mtz.-Almeida
2018-12-13 16:43:04 +01:00
parent b6aea08be4
commit a961dca7e8
2 changed files with 12 additions and 7 deletions

View File

@ -59,7 +59,6 @@ export class IonTabs {
@HostListener('ionTabButtonClick', ['$event.detail'])
onTabButtonClick(detail: TabButtonClickDetail) {
const { tab, selected } = detail;
if (tab) {
const href = `${this.outlet.tabsPrefix}/${tab}`;
const url = selected
? href
@ -68,4 +67,3 @@ export class IonTabs {
this.navCtrl.navigateBack(url, true);
}
}
}

View File

@ -77,6 +77,9 @@ export class TabButton implements ComponentInterface {
if (this.layout === undefined) {
this.layout = this.config.get('tabButtonLayout', 'icon-top');
}
if (isNotDefined(this.tab)) {
console.error('Missing "tab" property in <ion-tab-button>');
}
}
private get hasLabel() {
@ -117,3 +120,7 @@ export class TabButton implements ComponentInterface {
);
}
}
function isNotDefined(a: any) {
return a == null;
}