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

Commit 60e4316

Browse files
palasletwesleycho
authored andcommitted
fix(dropdown): add safety check for setIsOpen
- Ensure `setIsOpen` is a function, due to it optionally being falsy Closes #4030
1 parent 0c78026 commit 60e4316

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dropdown/dropdown.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
220220
self.selectedOption = null;
221221
}
222222

223-
setIsOpen($scope, isOpen);
223+
if (angular.isFunction(setIsOpen)) {
224+
setIsOpen($scope, isOpen);
225+
}
224226
});
225227

226228
$scope.$on('$locationChangeSuccess', function() {

0 commit comments

Comments
 (0)