From a56fcdfa8f19efcc53c2163d60c9c1e1bafbc019 Mon Sep 17 00:00:00 2001
From: wxiaoguang <wxiaoguang@gmail.com>
Date: Wed, 20 Apr 2022 07:30:09 +0800
Subject: [PATCH] Fix nil error when some pages are rendered outside request
 context (#19427)

---
 templates/base/footer_content.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl
index 52e7c7e77..f5ec6b0bf 100644
--- a/templates/base/footer_content.tmpl
+++ b/templates/base/footer_content.tmpl
@@ -10,7 +10,7 @@
 					{{AppVer}}
 				{{end}}
 			{{end}}
-			{{if ShowFooterTemplateLoadTime}}
+			{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
 				{{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
 				{{.i18n.Tr "template"}}
 				{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>