Checking if $scope.model.value is an array on the add method.
This commit is contained in:
@@ -86,6 +86,10 @@
|
||||
};
|
||||
|
||||
$scope.add = function ($event) {
|
||||
if (!angular.isArray($scope.model.value)) {
|
||||
$scope.model.value = [];
|
||||
}
|
||||
|
||||
if ($scope.newCaption == "") {
|
||||
$scope.hasError = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user