fix(all): updated tslint rules to latest

This commit is contained in:
Manu Mtz.-Almeida
2018-07-29 13:03:47 +02:00
parent d1969bdf1d
commit 92e21a8cf3
112 changed files with 546 additions and 574 deletions

View File

@ -1,4 +1,4 @@
import { Component, Method, Prop } from '@stencil/core';
import { Build, Component, Method, Prop } from '@stencil/core';
import { Animation, AnimationBuilder, Menu } from '../../interface';
import { menuOverlayAnimation } from './animations/overlay';
@ -119,20 +119,22 @@ export class MenuController {
*/
@Method()
get(menuId?: string): HTMLIonMenuElement | null {
if (menuId === 'left') {
console.error('menu.side=left is deprecated, use "start" instead');
return null;
}
if (menuId === 'right') {
console.error('menu.side=right is deprecated, use "end" instead');
return null;
if (Build.isDev) {
if (menuId === 'left') {
console.error('menu.side=left is deprecated, use "start" instead');
return null;
}
if (menuId === 'right') {
console.error('menu.side=right is deprecated, use "end" instead');
return null;
}
}
if (menuId === 'start' || menuId === 'end') {
// there could be more than one menu on the same side
// so first try to get the enabled one
const menu = this.find(m => m.side === menuId && !m.disabled);
if (menu) {
return menu;
const menuRef = this.find(m => m.side === menuId && !m.disabled);
if (menuRef) {
return menuRef;
}
// didn't find a menu side that is enabled