Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-28 14:39:58 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-28 16:14:55 +0300
commitb0d850321e58a052ead25f7014b7851f63497601 (patch)
tree259c88911dc10eb7264fec17725357a97fd0b7a4 /tpl
parentb66d38c41939252649365822d9edb10cf5990617 (diff)
Fix rebuild logic when editing template using a base template
We have been doing too much work in that case. Fixes #6968
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index 457a5cb92..b6313e1e5 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -383,9 +383,15 @@ func (t *templateHandler) LookupVariant(name string, variants tpl.TemplateVarian
}
func (t *templateHandler) HasTemplate(name string) bool {
+
if _, found := t.baseof[name]; found {
return true
}
+
+ if _, found := t.needsBaseof[name]; found {
+ return true
+ }
+
_, found := t.Lookup(name)
return found
}