aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-04-20 07:30:09 +0800
committerGitHub <noreply@github.com>2022-04-19 19:30:09 -0400
commita56fcdfa8f19efcc53c2163d60c9c1e1bafbc019 (patch)
tree51c6726e06af276432e2f03c917f328a6ba6ea74
parent18727df73a00e7d05d3e1a68d6dae521cca7ff49 (diff)
downloadgitea-a56fcdfa8f19efcc53c2163d60c9c1e1bafbc019.tar.gz
gitea-a56fcdfa8f19efcc53c2163d60c9c1e1bafbc019.zip
Fix nil error when some pages are rendered outside request context (#19427)
-rw-r--r--templates/base/footer_content.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl
index 52e7c7e77e..f5ec6b0bf3 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>