Node.js based forum software built for the modern web
fixing categories with null parentCids, again
Julian Lamceba856006a5
diff --git a/src/categories.js b/src/categories.jsindex b3c29a5a15..9bcb78f025 100644--- a/src/categories.js+++ b/src/categories.js@@ -252,12 +252,14 @@ var async = require('async'),Categories.getMultipleCategoryFields(cids, ['parentCid'], function(err, data) {if (err) {return callback(err);- } else if (!data.hasOwnProperty('parentCid')) {- data.parentCid = 0;}var parentCids = data.map(function(category) {- return category && category.parentCid;+ if (category && category.hasOwnProperty('parentCid') && category.parentCid) {+ return category.parentCid;+ } else {+ return 0;+ }});Categories.getCategoriesData(parentCids, callback);