mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 01:18:35 +02:00
fix null parents
This commit is contained in:
@@ -315,8 +315,8 @@ var db = require('./database'),
|
||||
}
|
||||
|
||||
async.map(categories, function(category, next) {
|
||||
if (!category) {
|
||||
return next(null, category);
|
||||
if (!category || !parseInt(category.cid, 10)) {
|
||||
return next(null, null);
|
||||
}
|
||||
category.name = validator.escape(category.name);
|
||||
category.description = validator.escape(category.description);
|
||||
|
||||
Reference in New Issue
Block a user