diff --git a/src/views/email.js b/src/views/email.js index bb4eb5705..45ca86632 100644 --- a/src/views/email.js +++ b/src/views/email.js @@ -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;