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

Commit 7c2a209

Browse files
committed
Remove check on collection: can fail even in legit cases
1 parent 8b63f1e commit 7c2a209

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/select.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ angular.module('ui.select', [])
9898
* put as much logic in the controller (instead of the link functions) as possible so it can be easily tested.
9999
*/
100100
.controller('uiSelectCtrl',
101-
['$scope', '$element', '$timeout', 'RepeatParser', '$parse', 'uiSelectMinErr',
102-
function($scope, $element, $timeout, RepeatParser, $parse, uiSelectMinErr) {
101+
['$scope', '$element', '$timeout', 'RepeatParser', 'uiSelectMinErr',
102+
function($scope, $element, $timeout, RepeatParser, uiSelectMinErr) {
103103

104104
var ctrl = this;
105105

@@ -142,12 +142,6 @@ angular.module('ui.select', [])
142142

143143
ctrl.parseRepeatAttr = function(repeatAttr) {
144144
var repeat = RepeatParser.parse(repeatAttr);
145-
var repeatRhsFn = $parse(repeat.rhs);
146-
147-
var collection = repeatRhsFn($scope);
148-
if (!angular.isArray(collection)) {
149-
throw uiSelectMinErr('repeat', "Expected a collection but got '{0}'.", repeat.rhs);
150-
}
151145

152146
// See https://github.com/angular/angular.js/blob/55848a9139/src/ng/directive/ngRepeat.js#L259
153147
$scope.$watchCollection(repeat.rhs, function(items) {

0 commit comments

Comments
 (0)