don't build bodyClass twice when rendering 404

its already called in res.render
This commit is contained in:
Barış Soner Uşaklı
2026-03-12 13:03:13 -04:00
parent f00784fb94
commit cdc92f1024
2 changed files with 1 additions and 2 deletions

View File

@@ -71,7 +71,6 @@ exports.send404 = helpers.try(async (req, res) => {
res.render('404', {
path: validator.escape(path),
title: '[[global:404.title]]',
bodyClass: helpers.buildBodyClass(req, res),
icon: icons[secureRandom(0, icons.length - 1)],
});
});

View File

@@ -3,7 +3,7 @@
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
<div class="mx-auto p-4 bg-light border rounded">
<div class="mx-auto p-4">
<i class="text-secondary fa fa-fw fa-4x {{{ if icon }}}{icon}{{{ else }}}fa-otter{{{ end }}}"></i>
</div>
{{{ if error }}}{error}{{{ else }}}[[global:404.message, {config.relative_path}]]{{{ end }}}