Sentry fix: handle scenario when account is invalid / folder not found

This commit is contained in:
Ben Gotow 2017-12-04 08:42:35 -08:00
parent fdbffbf126
commit a0fe657d70

View file

@ -408,7 +408,10 @@ class CategoryMailboxPerspective extends MailboxPerspective {
return this._categories.some(cat => {
const representedFolder =
cat instanceof Folder ? cat : CategoryStore.getAllMailCategory(cat.accountId);
return FolderSyncProgressStore.isSyncingAccount(cat.accountId, representedFolder.path);
return (
representedFolder &&
FolderSyncProgressStore.isSyncingAccount(cat.accountId, representedFolder.path)
);
});
}