From 1827ede79b69bb81cc3fd8747e0e431508a169fd Mon Sep 17 00:00:00 2001 From: FrankUrbainsky Date: Thu, 21 Aug 2014 19:08:43 +0200 Subject: [PATCH] fixed rendering of html files after setting the templateRoot manually --- lib/handlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers.js b/lib/handlers.js index 7896b28..ba4b019 100644 --- a/lib/handlers.js +++ b/lib/handlers.js @@ -7,7 +7,7 @@ exports.last = function(req, res, next) { if (req.body.format === 'js') { return res.send(res.locals.bundle); } else if (req.body.format === 'html' || req.query.format === 'html') { - return res.render(this.templateRoot + '/' + req.templatePath, res.locals.bundle); + return res.render(req.quer.model.templateRoot + '/' + req.templatePath, res.locals.bundle); } else { return res.status(res.locals.status_code).json(res.locals.bundle); }