From 2f0bd54087716b7885feb9d836026f6ff96b595c Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 3 Oct 2022 06:55:01 +0200 Subject: [PATCH] feat(templates): only fallthrough when template is set resolves #2859 --- src/engine/segment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/segment.go b/src/engine/segment.go index f3f846b0..aaf01b12 100644 --- a/src/engine/segment.go +++ b/src/engine/segment.go @@ -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 } }