mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
chore: eslint prefer-destructuring
This commit is contained in:
committed by
Julian Lam
parent
8d1462ffd8
commit
23f212a4c0
@@ -37,7 +37,7 @@ async function rewrite(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
const pathname = parsedUrl.pathname;
|
||||
const { pathname } = parsedUrl;
|
||||
const hook = `action:homepage.get:${pathname}`;
|
||||
if (!plugins.hooks.hasListeners(hook)) {
|
||||
req.url = req.path + (!req.path.endsWith('/') ? '/' : '') + pathname;
|
||||
|
||||
Reference in New Issue
Block a user