mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
fix crash if category or children is invalid
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user