mirror of
https://github.com/rancher/norman.git
synced 2025-08-29 12:13:00 +00:00
Merge pull request #382 from rmweir/empty-array-fix
Differentiate between empty and nil arrays
This commit is contained in:
commit
b715968cde
@ -447,6 +447,10 @@ func (b *Builder) convertArray(fieldType string, value interface{}, op Operation
|
|||||||
}
|
}
|
||||||
|
|
||||||
var result []interface{}
|
var result []interface{}
|
||||||
|
if value == nil {
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
result = make([]interface{}, 0)
|
||||||
subType := definition.SubType(fieldType)
|
subType := definition.SubType(fieldType)
|
||||||
|
|
||||||
for _, value := range sliceValue {
|
for _, value := range sliceValue {
|
||||||
|
Loading…
Reference in New Issue
Block a user