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

Commit ed88969

Browse files
author
Brian Feister
committed
Move ctrl.open check to top
1 parent 1590532 commit ed88969

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/select.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,14 @@
311311
};
312312

313313
ctrl.isActive = function(itemScope) {
314+
if ( !ctrl.open ) {
315+
return false;
316+
}
314317
var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]);
315318
if ( ctrl.taggingLabel === false && ctrl.activeIndex === -1 ) {
316319
return false;
317320
}
318-
return ctrl.open && itemIndex === ctrl.activeIndex;
321+
return itemIndex === ctrl.activeIndex;
319322
};
320323

321324
ctrl.isDisabled = function(itemScope) {

0 commit comments

Comments
 (0)