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

Commit 0fb52ba

Browse files
committed
Dropdown can also be an empty array
1 parent bc3de20 commit 0fb52ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uiSelectDirective.js

Lines changed: 2 additions & 2 deletions
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)