Skip to content

Commit 42eb4b1

Browse files
committed
error handling when template is empty in ExtractVariables
1 parent d3fa62e commit 42eb4b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/variables/parsers/VariableTemplateParser.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ func (impl *VariableTemplateParserImpl) handlePrimitivesForJson(parserRequest Va
128128
func (impl *VariableTemplateParserImpl) ExtractVariables(template string, templateType VariableTemplateType) ([]string, error) {
129129
var variables []string
130130

131+
if template == "" {
132+
return variables, nil
133+
}
134+
131135
if !impl.variableTemplateParserConfig.ScopedVariableEnabled {
132136
return variables, nil
133137
}

0 commit comments

Comments
 (0)