diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index fda87711fb..7250fab3b6 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -103,7 +103,9 @@ helpers.generateChildrenCategories = function(category) { var html = ''; var relative_path = (typeof config !== 'undefined' ? config.relative_path : require('nconf').get('relative_path')); - + if (!category || !category.children) { + return html; + } category.children.forEach(function(child) { if (!child) { return;