diff --git a/src/mailbox-perspective.coffee b/src/mailbox-perspective.coffee index 4e2095aaf..c8b73681a 100644 --- a/src/mailbox-perspective.coffee +++ b/src/mailbox-perspective.coffee @@ -370,8 +370,10 @@ class CategoryMailboxPerspective extends MailboxPerspective threads: threads, categoriesToRemove: (accountId) => # Remove all categories from this perspective that match the accountId - _.filter(@_categories, _.matcher({accountId})) - categoriesToAdd: (accId) => [(ruleset[name] ? ruleset.other)(accId)] + return _.filter(@_categories, _.matcher({accountId})) + categoriesToAdd: (accId) => + category = (ruleset[name] ? ruleset.other)(accId) + return if category then [category] else [] )