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

Commit d8b3fd5

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 d8b3fd5

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/select.js

Whitespace-only changes.

src/uiSelectController.js

+1-1
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)