prevent crash in getChildren

v1.18.x
barisusakli 10 years ago
parent 989ca19df5
commit 26b2ef1543

@ -288,7 +288,7 @@ var async = require('async'),
// Filter categories to isolate children, and remove disabled categories // Filter categories to isolate children, and remove disabled categories
async.map(cids, function(cid, next) { async.map(cids, function(cid, next) {
next(null, categories.filter(function(category) { next(null, categories.filter(function(category) {
return parseInt(category.parentCid, 10) === parseInt(cid, 10) && !category.disabled; return category && parseInt(category.parentCid, 10) === parseInt(cid, 10) && !category.disabled;
})); }));
}, next); }, next);
} }

Loading…
Cancel
Save