Merge pull request #5141 from umbraco/temp8-4427-3

check if value exists
This commit is contained in:
Bjarke Berg
2019-04-03 13:22:04 +02:00
committed by GitHub

View File

@@ -5,6 +5,7 @@ function textAreaController($scope) {
if (!$scope.model.config) {
$scope.model.config = {};
}
$scope.model.count = 0;
if (!$scope.model.config.maxChars) {
$scope.model.config.maxChars = false;
@@ -16,7 +17,9 @@ function textAreaController($scope) {
}
$scope.model.change = function () {
$scope.model.count = $scope.model.value.length;
if ($scope.model.value) {
$scope.model.count = $scope.model.value.length;
}
}
$scope.model.change();
}