Skip to content

Commit

Permalink
fix(uiSelectMultiple): do not add undefined items
Browse files Browse the repository at this point in the history
Prevent creating and adding undefined items to $select.selected.
Addresses angular-ui#1269.
  • Loading branch information
kavika-1 authored Jul 8, 2016
1 parent e179dc6 commit b735866
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/uiSelectMultipleDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec
if($select.selected.length >= $select.limit) {
return;
}
if (item === undefined) {
return;
}
$select.selected.push(item);
$selectMultiple.updateModel();
});
Expand Down

0 comments on commit b735866

Please sign in to comment.