mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 15:35:47 +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) {
|
if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
childrenCids = childrenCids.filter(cid => !allCids.includes(parseInt(cid, 10)));
|
||||||
if (!childrenCids.length) {
|
if (!childrenCids.length) {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user