feat(templates): only fallthrough when template is set

resolves #2859
This commit is contained in:
Jan De Dobbeleer 2022-10-03 06:55:01 +02:00 committed by Jan De Dobbeleer
parent c88c4eb049
commit 2f0bd54087

View file

@ -346,7 +346,7 @@ func (segment *Segment) string() string {
var templatesResult string
if !segment.Templates.Empty() {
templatesResult = segment.Templates.Resolve(segment.writer, segment.env, "", segment.TemplatesLogic)
if len(templatesResult) != 0 && len(segment.Template) == 0 {
if len(segment.Template) == 0 {
return templatesResult
}
}