Skip to content

Node.js based forum software built for the modern web

fix missing category data

barisusaklidfa11507097f
diff --git a/src/categories.js b/src/categories.js
index 0203afa6ba..a4cbce57bf 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -253,6 +253,9 @@ var db = require('./database'),
}
async.map(categories, function(category, next) {
+ if (!category) {
+ return next(null, category);
+ }
category.name = validator.escape(category.name);
category.description = validator.escape(category.description);
category.backgroundImage = category.image ? nconf.get('relative_path') + category.image : '';