mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 17:22:26 +02:00
adding default of parentCid 0 if parentCid not set
This commit is contained in:
@@ -252,6 +252,8 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user