From f16d98fcabea806a14aa8474b4b045c18b6a5511 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 3 Apr 2014 14:33:03 -0400 Subject: [PATCH] linting --- src/middleware/middleware.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 3fba90dd3a..35b52b32fe 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -50,7 +50,7 @@ middleware.redirectToAccountIfLoggedIn = function(req, res, next) { } else { next(); } -} +}; middleware.addSlug = function(req, res, next) { function redirect(method, id, name) { @@ -288,7 +288,6 @@ middleware.processRender = function(req, res, next) { var render = res.render; res.render = function(template, options, fn) { var self = this, - options = options || {}, req = this.req, app = req.app, defaultFn = function(err, str){ @@ -299,8 +298,11 @@ middleware.processRender = function(req, res, next) { self.send(str); }; + options = options || {}; + if ('function' === typeof options) { - fn = options, options = {}; + fn = options; + options = {}; } if ('function' !== typeof fn) {