[Autocomplete] Check if indexed filteredOptions is defined
This commit is contained in:
@@ -68,7 +68,9 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function fillInputWithIndexedOption() {
|
function fillInputWithIndexedOption() {
|
||||||
$scope.ngModel[$scope.field] = $scope.filteredOptions[$scope.optionIndex].name;
|
if($scope.filteredOptions[$scope.optionIndex]) {
|
||||||
|
$scope.ngModel[$scope.field] = $scope.filteredOptions[$scope.optionIndex].name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.keyDown = function($event) {
|
$scope.keyDown = function($event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user