nova:subscribe - fix exception in category's callback when a post isn't assigned to a category

This commit is contained in:
xavcz 2016-08-17 10:29:08 +02:00
parent 15f854fa6f
commit 11d7524798

View file

@ -73,7 +73,7 @@ if (typeof Package['nova:posts'] !== "undefined") {
const SubscribedCategoriesNotifications = (post) => {
if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories.length) {
if (typeof Telescope.notifications !== "undefined" && Meteor.isServer && !!post.categories && !!post.categories.length) {
// get the subscribers of the different categories from the post's categories
const subscribers = post.categories
// find the category from its id