Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit afa213d

Browse files
author
Robert Messerle
committed
fix(autocomplete): prevents an error when passing null instead of an
array
1 parent 7b8efe2 commit afa213d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/autocomplete/js/autocompleteController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
478478
term = searchText.toLowerCase();
479479
if (angular.isArray(items)) {
480480
handleResults(items);
481-
} else {
481+
} else if (items) {
482482
ctrl.loading = true;
483483
if (items.success) items.success(handleResults);
484484
if (items.then) items.then(handleResults);

0 commit comments

Comments
 (0)