mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: bad assignment logic in middleware.renderHeader
This commit is contained in:
@@ -80,7 +80,7 @@ middleware.renderHeader = async (req, res, data) => {
|
|||||||
templateValues.template[res.locals.template] = true;
|
templateValues.template[res.locals.template] = true;
|
||||||
|
|
||||||
// Normally this should hook be automatically added by middleware.processRender(), but it seems to only be fired for page hooks, and not when called internally.
|
// Normally this should hook be automatically added by middleware.processRender(), but it seems to only be fired for page hooks, and not when called internally.
|
||||||
({ templateValues } = await plugins.hooks.fire('filter:admin/header.build', { req, res, templateData: templateValues }));
|
({ templateData: templateValues } = await plugins.hooks.fire('filter:admin/header.build', { req, res, templateData: templateValues }));
|
||||||
|
|
||||||
return await req.app.renderAsync('admin/header', templateValues);
|
return await req.app.renderAsync('admin/header', templateValues);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user