mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
helper/schema: zero value set should set function [GH-1009]
This commit is contained in:
parent
f4408f2e63
commit
0bc0c03fec
@ -42,8 +42,8 @@ func (r *FieldReadResult) ValueOrZero(s *Schema) interface{} {
|
|||||||
|
|
||||||
// The zero value of a set is nil, but we want it
|
// The zero value of a set is nil, but we want it
|
||||||
// to actually be an empty set object...
|
// to actually be an empty set object...
|
||||||
if s.Type == TypeSet && result == nil {
|
if set, ok := result.(*Set); ok && set.F == nil {
|
||||||
result = &Set{F: s.Set}
|
set.F = s.Set
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user