1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-25 10:22:18 -05:00

Merge pull request #244 from whiteout-io/dev/WO-805

[WO-805] Do not attempt to write to undefined when folders are not yet loaded
This commit is contained in:
Tankred Hase 2015-01-08 14:47:50 +01:00
commit b62c551b8b

View File

@ -100,6 +100,12 @@ var NavigationCtrl = function($scope, $location, $q, account, email, outbox, not
var ob = _.findWhere($scope.account.folders, { var ob = _.findWhere($scope.account.folders, {
type: config.outboxMailboxType type: config.outboxMailboxType
}); });
if (!ob) {
// the outbox folder has not been initialized yet
return;
}
ob.count = count; ob.count = count;
return $q(function(resolve) { return $q(function(resolve) {