Node.js based forum software built for the modern web
parallel not needed
yariplus0c1c42d36223
diff --git a/src/controllers/admin.js b/src/controllers/admin.jsindex f40ce3c84c..7d1e55d8c2 100644--- a/src/controllers/admin.js+++ b/src/controllers/admin.js@@ -348,32 +348,28 @@ adminController.navigation.get = function(req, res, next) {};adminController.homepage.get = function(req, res, next) {- async.parallel({- categoryData: function(next) {- async.waterfall([- function(next) {- db.getSortedSetRange('cid:0:children', 0, -1, next);- },- function(cids, next) {- privileges.categories.filterCids('find', cids, 0, next);- },- function(cids, next) {- categories.getMultipleCategoryFields(cids, ['name', 'slug'], next);- },- function(categoryData, next) {- async.map(categoryData, function(category, next) {- var route = 'category/' + category.slug;-- next(null, {- route: route,- name: 'Category: ' + category.name- });- }, next);- }- ], next);+ async.waterfall([+ function(next) {+ db.getSortedSetRange('cid:0:children', 0, -1, next);+ },+ function(cids, next) {+ privileges.categories.filterCids('find', cids, 0, next);+ },+ function(cids, next) {+ categories.getMultipleCategoryFields(cids, ['name', 'slug'], next);+ },+ function(categoryData, next) {+ async.map(categoryData, function(category, next) {+ var route = 'category/' + category.slug;++ next(null, {+ route: route,+ name: 'Category: ' + category.name+ });+ }, next);}- }, function(err, results) {- if (err || !results || !results.categoryData) results = {categoryData:[]};+ ], function(err, categoryData) {+ if (err || !categoryData) categoryData = [];plugins.fireHook('filter:homepage.get', {routes: [{@@ -388,7 +384,7 @@ adminController.homepage.get = function(req, res, next) {route: 'popular',name: 'Popular'}- ].concat(results.categoryData)}, function(err, data) {+ ].concat(categoryData)}, function(err, data) {data.routes.push({route: '',name: 'Custom'