From f44e850fa0eb3653f1ec02c40098ef075a1be3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 23 Apr 2015 13:50:48 -0400 Subject: [PATCH] revert last change, breaks ajaxify --- src/middleware/middleware.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index b2a7653fd0..8adc6aabe7 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -309,9 +309,9 @@ middleware.processRender = function(req, res, next) { } options.loggedIn = req.user ? parseInt(req.user.uid, 10) !== 0 : false; - options.template = options.template || {name: template}; - options.template[options.template.name] = true; - res.locals.template = options.template.name; + options.template = {name: template}; + options.template[template] = true; + res.locals.template = template; if ('function' !== typeof fn) { fn = defaultFn;