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

Commit

Permalink
fix(dropdown): add safety check for setIsOpen
Browse files Browse the repository at this point in the history
- Ensure `setIsOpen` is a function, due to it optionally being falsy

Closes #4030
  • Loading branch information
palaslet authored and wesleycho committed Jul 28, 2015
1 parent 0c78026 commit 60e4316
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
self.selectedOption = null;
}

setIsOpen($scope, isOpen);
if (angular.isFunction(setIsOpen)) {
setIsOpen($scope, isOpen);
}
});

$scope.$on('$locationChangeSuccess', function() {
Expand Down

0 comments on commit 60e4316

Please sign in to comment.