v1.18.x
barisusakli 10 years ago
parent 38e7ecbb41
commit 1511a0c3fe

@ -169,11 +169,10 @@ function getTemplatesListing(req, res, next) {
return next(err);
}
var data = [];
data = results.views.filter(function(value, index, self) {
return self.indexOf(value) === index;
var data = results.views.filter(function(value, index, self) {
return value && self.indexOf(value) === index;
}).map(function(el) {
return el.replace(nconf.get('views_dir') + '/', '');
return el && el.replace(nconf.get('views_dir') + '/', '');
});
data = data.concat(results.extended);

Loading…
Cancel
Save