mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
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:
@ -263,7 +263,7 @@ export class MenuController {
|
||||
if (menu) return menu;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user