mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 01:55:56 +02:00
chore: eslint prefer-destructuring
This commit is contained in:
committed by
Julian Lam
parent
8d1462ffd8
commit
23f212a4c0
@@ -16,10 +16,10 @@ const relative_path = nconf.get('relative_path');
|
||||
module.exports = function (middleware) {
|
||||
middleware.processRender = function processRender(req, res, next) {
|
||||
// res.render post-processing, modified from here: https://gist.github.com/mrlannigan/5051687
|
||||
const render = res.render;
|
||||
const { render } = res;
|
||||
res.render = async function renderOverride(template, options, fn) {
|
||||
const self = this;
|
||||
const req = this.req;
|
||||
const { req } = this;
|
||||
|
||||
options = options || {};
|
||||
if (typeof options === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user