Skip to content

Node.js based forum software built for the modern web

if no categories found return empty array

barisusakli364d55938c80
diff --git a/src/categories.js b/src/categories.js
index feb8a9b927..86b4f95ec8 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -183,7 +183,7 @@ var db = require('./database'),
}
if (!Array.isArray(cids) || !cids.length) {
- return callback(null, {categories : []});
+ return callback(null, []);
}
Categories.getCategoriesData(cids, callback);
@@ -197,7 +197,7 @@ var db = require('./database'),
}
if (!Array.isArray(cids) || !cids.length) {
- return callback(null, {categories : []});
+ return callback(null, []);
}
Categories.getCategories(cids, uid, function(err, categories) {