diff options
Diffstat (limited to 'tpl/transform/unmarshal.go')
-rw-r--r-- | tpl/transform/unmarshal.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tpl/transform/unmarshal.go b/tpl/transform/unmarshal.go index aa84ca1f8..c59269577 100644 --- a/tpl/transform/unmarshal.go +++ b/tpl/transform/unmarshal.go @@ -95,6 +95,10 @@ func (ns *Namespace) Unmarshal(args ...interface{}) (interface{}, error) { return nil, errors.Errorf("type %T not supported", data) } + if dataStr == "" { + return nil, errors.New("no data to transform") + } + key := helpers.MD5String(dataStr) return ns.cache.GetOrCreate(key, func() (interface{}, error) { |