We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c3c23 commit f75341cCopy full SHA for f75341c
typed/remove.go
@@ -86,6 +86,10 @@ func (w *removingWalker) doList(t schema.List) (errs ValidationErrors) {
86
newItems = append(newItems, l.Items[i])
87
}
88
l.Items = newItems
89
+ if len(l.Items) == 0 {
90
+ w.value.ListValue = nil
91
+ w.value.Null = true
92
+ }
93
return nil
94
95
@@ -111,6 +115,10 @@ func (w *removingWalker) doMap(t schema.Map) ValidationErrors {
111
115
newMap.Set(item.Name, m.Items[i].Value)
112
116
113
117
w.value.MapValue = newMap
118
+ if len(w.value.MapValue.Items) == 0 {
119
+ w.value.MapValue = nil
120
121
114
122
123
124
0 commit comments