Handle corner case, where mailbox referenced in mailinglist got removed
This commit is contained in:
@@ -110,7 +110,10 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
|
||||
show: function (list) {
|
||||
$scope.mailinglists.edit.name = list.name;
|
||||
$scope.mailinglists.edit.members = list.members.map(function (name) { return $scope.mailboxes.mailboxes.find(function (m) { return m.name === name; })});
|
||||
var members = list.members.map(function (name) { return $scope.mailboxes.mailboxes.find(function (m) { return m.name === name; })});
|
||||
|
||||
// A mailinglist may contain mailbox names, which do not exist, so remove them here
|
||||
$scope.mailinglists.edit.members = members.filter(function (m) { return !!m; });
|
||||
|
||||
$('#mailinglistEditModal').modal('show');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user