mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
prevent crash if children are falsy
This commit is contained in:
@@ -356,6 +356,7 @@ var async = require('async'),
|
||||
Categories.getCategoriesData(children, next);
|
||||
},
|
||||
function (childrenData, next) {
|
||||
childrenData = childrenData.filter(Boolean);
|
||||
category.children = childrenData;
|
||||
async.each(category.children, function(child, next) {
|
||||
getChildrenRecursive(child, uid, next);
|
||||
|
||||
Reference in New Issue
Block a user