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

Commit

Permalink
fix(autocomplete): prevents an error when passing null instead of an
Browse files Browse the repository at this point in the history
array
  • Loading branch information
Robert Messerle committed Jun 15, 2015
1 parent 7b8efe2 commit afa213d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/autocomplete/js/autocompleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
term = searchText.toLowerCase();
if (angular.isArray(items)) {
handleResults(items);
} else {
} else if (items) {
ctrl.loading = true;
if (items.success) items.success(handleResults);
if (items.then) items.then(handleResults);
Expand Down

0 comments on commit afa213d

Please sign in to comment.