From beb73131381bfe969f146876a62afa737221ec97 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 13 Apr 2014 22:32:51 -0400 Subject: [PATCH] added err to next --- src/middleware/middleware.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 11a959b853..f56cc9404d 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -151,7 +151,7 @@ middleware.buildHeader = function(req, res, next) { function(next) { controllers.api.getConfig(req, res, function(err, config) { res.locals.config = config; - next(); + next(err); }); }, function(next) { @@ -163,9 +163,7 @@ middleware.buildHeader = function(req, res, next) { }); }); } - ], function(err) { - next(err); - }); + ], next); }; middleware.renderHeader = function(req, res, callback) {