filter links and children

v1.18.x
Barış Soner Uşaklı 10 years ago
parent 0e8482ebfe
commit 76c0e33bcb

@ -491,6 +491,9 @@ app.cacheBuster = null;
if (err) { if (err) {
return app.alertError(err.message); return app.alertError(err.message);
} }
categories = categories.filter(function(category) {
return !category.link && !parseInt(category.parentCid, 10);
});
if (categories.length) { if (categories.length) {
$(window).trigger('action:composer.topic.new', { $(window).trigger('action:composer.topic.new', {
cid: categories[0].cid cid: categories[0].cid

Loading…
Cancel
Save