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

Commit c1a65bf

Browse files
committed
Fix tolerance for null or undefined values
1 parent 4ac8fc2 commit c1a65bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uiSelectMultipleDirective.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec
145145
if(!angular.isArray(ngModel.$viewValue)){
146146
// Have tolerance for null or undefined values
147147
if(angular.isUndefined(ngModel.$viewValue) || ngModel.$viewValue === null){
148-
$select.selected = [];
148+
ngModel.$viewValue = [];
149149
} else {
150150
throw uiSelectMinErr('multiarr', "Expected model value to be array but got '{0}'", ngModel.$viewValue);
151151
}
@@ -398,4 +398,4 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec
398398

399399
}
400400
};
401-
}]);
401+
}]);

0 commit comments

Comments
 (0)