feat: Asegurar que las banderas de navegación existan para evitar ReferenceError en las plantillas

This commit is contained in:
Shni
2025-10-14 23:33:56 -05:00
parent 3fe714ad20
commit edf2c995fa

View File

@@ -536,6 +536,13 @@ const renderTemplate = async (
month: "long", month: "long",
year: "numeric", year: "numeric",
}), }),
// ensure nav flags exist to avoid ReferenceError inside templates
hideNavbar:
typeof locals.hideNavbar !== "undefined" ? locals.hideNavbar : false,
useDashboardNav:
typeof locals.useDashboardNav !== "undefined"
? locals.useDashboardNav
: false,
...locals, ...locals,
title: locals.title ?? defaultTitle, title: locals.title ?? defaultTitle,
body: pageBody, body: pageBody,