diff --git a/src/views/app.html b/src/views/app.html
index e4a513e6f..bdeedb356 100644
--- a/src/views/app.html
+++ b/src/views/app.html
@@ -133,7 +133,9 @@
diff --git a/src/views/app.js b/src/views/app.js
index 69a43aa0c..0352e7031 100644
--- a/src/views/app.js
+++ b/src/views/app.js
@@ -834,8 +834,12 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.repair.location = app.location;
$scope.repair.domain = $scope.domains.filter(function (d) { return d.domain === app.domain; })[0];
$scope.repair.alternateDomains = $scope.app.alternateDomains;
- $scope.repair.alternateDomains.forEach(function (d) {
- d.enabled = true;
+ $scope.repair.alternateDomains = $scope.app.alternateDomains.map(function (altDomain) {
+ return {
+ subdomain: altDomain.subdomain,
+ enabled: true,
+ domain: $scope.domains.filter(function (d) { return d.domain === altDomain.domain; })[0]
+ };
});
}
@@ -862,7 +866,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
if ($scope.app.error.domain) {
data.location = $scope.repair.location;
data.domain = $scope.repair.domain.domain;
- data.alternateDomains = $scope.repair.alternateDomains.filter(function (a) { return a.enabled; });
+ data.alternateDomains = $scope.repair.alternateDomains.filter(function (a) { return a.enabled; }).map(function (d) { return { subdomain: d.subdomain, domain: d.domain.domain })
}
if ($scope.app.error.backupId) {