refactor(all): strict boolean conditions

This commit is contained in:
Manu Mtz.-Almeida
2018-08-31 18:59:09 +02:00
parent f383ebdf13
commit ba2230510e
96 changed files with 983 additions and 955 deletions

View File

@ -98,12 +98,12 @@ export class Tab {
componentWillLoad() {
// Set default name
if (!this.name && typeof this.component === 'string') {
if (this.name === undefined && typeof this.component === 'string') {
this.name = this.component;
}
if (Build.isDev) {
if (this.component && this.el.childElementCount > 0) {
if (this.component !== undefined && this.el.childElementCount > 0) {
console.error('You can not use a lazy-loaded component in a tab and inlined content at the same time.' +
`- Remove the component attribute in: <ion-tab component="${this.component}">` +
` or` +
@ -145,7 +145,7 @@ export class Tab {
'aria-hidden': !active ? 'true' : null,
'role': 'tabpanel',
'class': {
'ion-page': !component,
'ion-page': component === undefined,
'tab-hidden': !active
}
};