mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
linting
This commit is contained in:
@@ -50,7 +50,7 @@ middleware.redirectToAccountIfLoggedIn = function(req, res, next) {
|
|||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
middleware.addSlug = function(req, res, next) {
|
middleware.addSlug = function(req, res, next) {
|
||||||
function redirect(method, id, name) {
|
function redirect(method, id, name) {
|
||||||
@@ -288,7 +288,6 @@ middleware.processRender = function(req, res, next) {
|
|||||||
var render = res.render;
|
var render = res.render;
|
||||||
res.render = function(template, options, fn) {
|
res.render = function(template, options, fn) {
|
||||||
var self = this,
|
var self = this,
|
||||||
options = options || {},
|
|
||||||
req = this.req,
|
req = this.req,
|
||||||
app = req.app,
|
app = req.app,
|
||||||
defaultFn = function(err, str){
|
defaultFn = function(err, str){
|
||||||
@@ -299,8 +298,11 @@ middleware.processRender = function(req, res, next) {
|
|||||||
self.send(str);
|
self.send(str);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
if ('function' === typeof options) {
|
if ('function' === typeof options) {
|
||||||
fn = options, options = {};
|
fn = options;
|
||||||
|
options = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('function' !== typeof fn) {
|
if ('function' !== typeof fn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user