mail: Fix crash when setting quota

This commit is contained in:
Girish Ramakrishnan
2022-10-13 22:53:49 +02:00
parent 2a9e177a38
commit 7985ed4b7d
+4 -2
View File
@@ -709,8 +709,10 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
m.ownerDisplayName = m.owner ? m.owner.display : ''; // this meta property is set when we get the user list
var u = $scope.diskUsage[m.name + '@' + m.domain]; // this is unset when no emails have been received yet
m.usage = (u && u.quotaValue * 1000) || 0;
m.limit = (u && u.quotaLimit * 1000) || 0;
if (!u) u = $scope.diskUsage[m.name + '@' + m.domain] = { quotaValue: 0, quotaLimit: 0 }; // ensure value
m.usage = u.quotaValue * 1000;
m.limit = u.quotaLimit * 1000;
});
$scope.mailboxes.mailboxes = mailboxes;