Skip to content

Commit

Permalink
Merge pull request angular-ui#199 from buchelew/patch-1
Browse files Browse the repository at this point in the history
Update select.js
  • Loading branch information
dimirc committed Oct 6, 2014
2 parents e8a6e54 + db61ed8 commit a9e9f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
if (ctrl.multiple){
//Remove already selected items
$scope.$watchCollection('$select.selected', function(selectedItems){
if (!selectedItems) return;
if (!selectedItems.length) return;
var data = ctrl.parserResult.source($scope);
var filteredItems = data.filter(function(i) {return selectedItems.indexOf(i) < 0;});
setItemsFn(filteredItems);
Expand Down

0 comments on commit a9e9f14

Please sign in to comment.