hcl: Elem on nil should return nil
This commit is contained in:
parent
99d585c297
commit
bf89042e7b
@ -71,6 +71,10 @@ func (o *Object) Elem(expand bool) []*Object {
|
|||||||
|
|
||||||
switch o.Type {
|
switch o.Type {
|
||||||
case ValueTypeObject:
|
case ValueTypeObject:
|
||||||
|
if o.Value == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return o.Value.([]*Object)
|
return o.Value.([]*Object)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user