fix: ensure we always serialize an empty map if nil
This commit is contained in:
parent
15030b6866
commit
d39f959e31
|
@ -71,5 +71,8 @@ func (dmd *DirectoryMetadataDetails) DecodeMsgpack(dec *msgpack.Decoder) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dmd DirectoryMetadataDetails) EncodeMsgpack(enc *msgpack.Encoder) error {
|
func (dmd DirectoryMetadataDetails) EncodeMsgpack(enc *msgpack.Encoder) error {
|
||||||
|
if dmd.Data == nil {
|
||||||
|
dmd.Data = make(map[int]interface{})
|
||||||
|
}
|
||||||
return enc.Encode(dmd.Data)
|
return enc.Encode(dmd.Data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue