This commit is contained in:
psychobunny
2014-04-03 14:33:03 -04:00
parent 3840a9e67e
commit f16d98fcab

View File

@@ -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) {