mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: failing tests @julianlam
This commit is contained in:
@@ -84,6 +84,7 @@ middleware.pageView = function pageView(req, res, next) {
|
||||
|
||||
middleware.pluginHooks = async function pluginHooks(req, res, next) {
|
||||
// TODO: Deprecate in v2.0
|
||||
try {
|
||||
await async.each(plugins.loadedHooks['filter:router.page'] || [], function (hookObj, next) {
|
||||
hookObj.method(req, res, next);
|
||||
});
|
||||
@@ -92,6 +93,9 @@ middleware.pluginHooks = async function pluginHooks(req, res, next) {
|
||||
req: req,
|
||||
res: res,
|
||||
});
|
||||
} catch (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
if (!res.headersSent) {
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user