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

Commit d75d021

Browse files
author
Robert Messerle
committed
fix(menu): fixes JS focus error on close
1 parent 8849213 commit d75d021

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
@@ -148,7 +148,7 @@ function MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout) {
148148
if (!skipFocus) {
149149
var el = self.restoreFocusTo || $element.find('button')[0];
150150
if (el instanceof angular.element) el = el[0];
151-
el.focus();
151+
if (el) el.focus();
152152
}
153153
};
154154

0 commit comments

Comments
 (0)