Skip to content

Commit

Permalink
encode empty ps.Maps as nil
Browse files Browse the repository at this point in the history
every little helps
  • Loading branch information
rade committed May 29, 2017
1 parent b703f4d commit bdfba29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report/map_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func mapRead(decoder *codec.Decoder, decodeValue func(isNil bool) interface{}) p
// undocumented internal APIs apply.
func mapWrite(m ps.Map, encoder *codec.Encoder, encodeValue func(*codec.Encoder, interface{})) {
z, r := codec.GenHelperEncoder(encoder)
if m == nil {
if m == nil || m.IsNil() {
r.EncodeNil()
return
}
Expand Down

0 comments on commit bdfba29

Please sign in to comment.