feat(menu): grab the menu by side only if it is enabled

this removes the need to pass an id when you enable one menu

references #5535
This commit is contained in:
Brandy Carney
2016-02-19 16:18:31 -05:00
parent 5e1eeff40d
commit a2b7a21a95

View File

@ -263,7 +263,7 @@ export class MenuController {
if (menu) return menu; if (menu) return menu;
// not found by "id", next try by "side" // not found by "id", next try by "side"
menu = this._menus.find(m => m.side === menuId); menu = this._menus.find(m => m.side === menuId && m._isEnabled);
if (menu) return menu; if (menu) return menu;
} }