diff --git a/hcl/object.go b/hcl/object.go index 6a35458..3c321db 100644 --- a/hcl/object.go +++ b/hcl/object.go @@ -71,6 +71,10 @@ func (o *Object) Elem(expand bool) []*Object { switch o.Type { case ValueTypeObject: + if o.Value == nil { + return nil + } + return o.Value.([]*Object) }