mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +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);
|
Categories.getCategoriesData(children, next);
|
||||||
},
|
},
|
||||||
function (childrenData, next) {
|
function (childrenData, next) {
|
||||||
|
childrenData = childrenData.filter(Boolean);
|
||||||
category.children = childrenData;
|
category.children = childrenData;
|
||||||
async.each(category.children, function(child, next) {
|
async.each(category.children, function(child, next) {
|
||||||
getChildrenRecursive(child, uid, next);
|
getChildrenRecursive(child, uid, next);
|
||||||
|
|||||||
Reference in New Issue
Block a user