1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-02 07:59:20 +00:00

do not embed map if empty

This commit is contained in:
Alena Prokharchyk 2018-04-11 17:33:53 -07:00
parent 7218407a4e
commit 1d27d67ff3

View File

@ -38,7 +38,9 @@ func (e *Embed) ToInternal(data map[string]interface{}) {
delete(data, fieldName)
}
if len(sub) == 0 {
return
}
data[e.Field] = sub
}