Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit a68cc20

Browse files
committed
chore(dropdown): add guard when closing
1 parent ba113a0 commit a68cc20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/dropdown/dropdown.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
2424
if (openScope === dropdownScope) {
2525
openScope = null;
2626
$document.off('click', closeDropdown);
27-
dropdownScope.getDropdownElement().off('keydown', this.keybindFilter);
27+
var dropdownMenu = dropdownScope.getDropdownElement();
28+
if (dropdownMenu) {
29+
dropdownMenu.off('keydown', this.keybindFilter);
30+
}
2831
}
2932
};
3033

0 commit comments

Comments
 (0)