diff --git a/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js b/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
index ab50fb7..430b2d2 100644
--- a/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
@@ -980,13 +980,13 @@ module.controller('ResourceServerPolicyResourceDetailCtrl', function($scope, $ro
for (i = 0; i < policies.length; i++) {
policies[i].text = policies[i].name;
$scope.selectedPolicies.push(policies[i]);
- var copy = angular.copy($scope.selectedPolicies);
- $scope.$watch('selectedPolicies', function() {
- if (!angular.equals($scope.selectedPolicies, copy)) {
- $scope.changed = true;
- }
- }, true);
}
+ var copy = angular.copy($scope.selectedPolicies);
+ $scope.$watch('selectedPolicies', function() {
+ if (!angular.equals($scope.selectedPolicies, copy)) {
+ $scope.changed = true;
+ }
+ }, true);
});
},