tpl/templates: Fix templates.Exist issue with base templates

Fixes #9477
This commit is contained in:
Bjørn Erik Pedersen
2022-02-09 15:51:44 +01:00
parent f60714b5a1
commit 6a238a7276
2 changed files with 86 additions and 2 deletions

View File

@@ -34,6 +34,5 @@ type Namespace struct {
// Note that this is the Unix-styled relative path including filename suffix,
// e.g. partials/header.html
func (ns *Namespace) Exists(name string) bool {
_, found := ns.deps.Tmpl().Lookup(name)
return found
return ns.deps.Tmpl().HasTemplate(name)
}