From cdc92f1024da14e193b3950a60b35b1daf66c929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 12 Mar 2026 13:03:13 -0400 Subject: [PATCH] don't build bodyClass twice when rendering 404 its already called in res.render --- src/controllers/404.js | 1 - src/views/404.tpl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/404.js b/src/controllers/404.js index bed1a085e3..6bda249078 100644 --- a/src/controllers/404.js +++ b/src/controllers/404.js @@ -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)], }); }); diff --git a/src/views/404.tpl b/src/views/404.tpl index e0a3d68ed2..482e16ecd9 100644 --- a/src/views/404.tpl +++ b/src/views/404.tpl @@ -3,7 +3,7 @@
-
+
{{{ if error }}}{error}{{{ else }}}[[global:404.message, {config.relative_path}]]{{{ end }}}