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

Commit 5ba8986

Browse files
committed
Merge pull request #956 from cdjackson/placeholder_bug
Protect against empty selection causing exception when getting placeHolder
2 parents 757bba6 + 6b7b27b commit 5ba8986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uiSelectController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ uis.controller('uiSelectCtrl',
145145
data = data || ctrl.parserResult.source($scope);
146146
var selectedItems = ctrl.selected;
147147
//TODO should implement for single mode removeSelected
148-
if ((angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.removeSelected) {
148+
if (ctrl.isEmpty() || (angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.removeSelected) {
149149
ctrl.setItemsFn(data);
150150
}else{
151151
if ( data !== undefined ) {

0 commit comments

Comments
 (0)