Skip to content

Commit b735866

Browse files
authored
fix(uiSelectMultiple): do not add undefined items
Prevent creating and adding undefined items to $select.selected. Addresses angular-ui#1269.
1 parent e179dc6 commit b735866

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/uiSelectMultipleDirective.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec
176176
if($select.selected.length >= $select.limit) {
177177
return;
178178
}
179+
if (item === undefined) {
180+
return;
181+
}
179182
$select.selected.push(item);
180183
$selectMultiple.updateModel();
181184
});

0 commit comments

Comments
 (0)