Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 6bf98aa

Browse files
committed
fix(mdMenu): fix attempting to close non-existant nested menus
1 parent e9bcec1 commit 6bf98aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/menu/js/menuController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout) {
6868
} else if (nestedMenu && !nestedMenu.isOpen && nestedMenu.open) {
6969
self.isAlreadyOpening = true;
7070
}
71-
nestedMenu.open();
71+
nestedMenu && nestedMenu.open();
7272
}, nestedMenu ? 100 : 250);
7373
var focusableTarget = event.currentTarget.querySelector('button:not([disabled])');
7474
focusableTarget && focusableTarget.focus();

0 commit comments

Comments
 (0)