fix: prevent infinite loops if category is already in children

v1.18.x
Barış Soner Uşaklı 6 years ago
parent b2fbeb053a
commit b71e0eb179

@ -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();
}

Loading…
Cancel
Save