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

Commit e817c5d

Browse files
committed
Merge pull request #1194 from sime/fix-dropdown-missing-style-property
Dropdown can also be an empty array
2 parents bc3de20 + 0fb52ba commit e817c5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uiSelectDirective.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ uis.directive('uiSelect',
260260
scope.$watch('$select.open', function(isOpen) {
261261
if (isOpen) {
262262
dropdown = angular.element(element).querySelectorAll('.ui-select-dropdown');
263-
if (dropdown === null) {
263+
if (dropdown.length === 0) {
264264
return;
265265
}
266266

@@ -283,7 +283,7 @@ uis.directive('uiSelect',
283283
dropdown[0].style.opacity = 1;
284284
});
285285
} else {
286-
if (dropdown === null) {
286+
if (dropdown === null || dropdown.length === 0) {
287287
return;
288288
}
289289

0 commit comments

Comments
 (0)