diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-28 12:39:58 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-28 14:14:55 +0100 |
commit | b0d850321e58a052ead25f7014b7851f63497601 (patch) | |
tree | 259c88911dc10eb7264fec17725357a97fd0b7a4 /tpl/tplimpl/template.go | |
parent | b66d38c41939252649365822d9edb10cf5990617 (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/tplimpl/template.go')
-rw-r--r-- | tpl/tplimpl/template.go | 6 |
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 } |