mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
fix: prevent infinite loops if category is already in children
This commit is contained in:
@@ -345,7 +345,7 @@ Categories.getChildrenCids = function (rootCid, callback) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
childrenCids = childrenCids.filter(cid => !allCids.includes(parseInt(cid, 10)));
|
||||
if (!childrenCids.length) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user