mirror of
https://github.com/go-micro/go-micro.git
synced 2025-09-16 08:36:30 +02:00
Don't unmarshal if result is nil
This commit is contained in:
@@ -86,7 +86,7 @@ func (c *clientCodec) ReadHeader(m *codec.Message) error {
|
||||
}
|
||||
|
||||
func (c *clientCodec) ReadBody(x interface{}) error {
|
||||
if x == nil {
|
||||
if x == nil || c.resp.Result == nil {
|
||||
return nil
|
||||
}
|
||||
return json.Unmarshal(*c.resp.Result, x)
|
||||
|
Reference in New Issue
Block a user