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

Commit 0c66974

Browse files
author
Robert Messerle
committed
update(autocomplete): adds function check for itemChange
1 parent 1be46cb commit 0c66974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/autocomplete/js/autocompleteController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
237237
if (selectedItem) {
238238
$scope.searchText = getDisplayValue(selectedItem);
239239
}
240-
if ($scope.itemChange && selectedItem !== previousSelectedItem)
240+
if (angular.isFunction($scope.itemChange) && selectedItem !== previousSelectedItem)
241241
$scope.itemChange(getItemScope(selectedItem));
242242
}
243243

0 commit comments

Comments
 (0)