Skip to content

Commit 347c76c

Browse files
set default value to empty array
in case if items source is not defined in $scope when initializing multiselect instance of ui-select, we'll get an undefined from ctrl.parserResult.source($scope). then next line will throw an exception when truing to filter undefined.
1 parent 3642a1d commit 347c76c

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
@@ -201,7 +201,7 @@ uis.controller('uiSelectCtrl',
201201
}
202202

203203
function setPlainItems(items) {
204-
ctrl.items = items;
204+
ctrl.items = items || [];
205205
}
206206

207207
ctrl.setItemsFn = groupByExp ? updateGroups : setPlainItems;

0 commit comments

Comments
 (0)