You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix transform property value to preserve nil arrays and objects (#2655)
The `propertyvalue.Transform` functions had a bug where it would always
mutate nil arrays and maps into empty ones:
```
value=resource.PropertyValue{}
```
would become:
```
value=resource.PropertyValue{
V: []resource.PropertyValue{
},
}
```
This had to do with typed nil interfaces in go:
https://dave.cheney.net/2017/08/09/typed-nils-in-go-2
The `V` in `resource.PropertyValue` is an interface, so it might be
non-nil `!= nil` but the underlying value is nil.
This change adds a fix and some tests for the problem.
0 commit comments