Skip to content

Commit bc8d80a

Browse files
author
Philip von Bargen
committed
fix(dropdown) prevent null pointer exception w/o inline template
1 parent 95d87ab commit bc8d80a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dropdown/dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip'])
116116
while (nextSibling && nextSibling.nodeType !== 1) {
117117
nextSibling = nextSibling.nextSibling;
118118
}
119-
if (nextSibling.classList.contains('dropdown-menu')) {
119+
if (nextSibling && nextSibling.classList.contains('dropdown-menu')) {
120120
tAttrs.template = nextSibling.outerHTML;
121121
tAttrs.templateUrl = undefined;
122122
nextSibling.parentNode.removeChild(nextSibling);

0 commit comments

Comments
 (0)