If nil, type doesn't matter

pull/619/head
Taylor Gerring 10 years ago
parent ac03ff6f05
commit bea3879d6f
  1. 3
      rpc/messages.go

@ -45,6 +45,9 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) {
func newHexData(input interface{}) *hexdata {
d := new(hexdata)
if input == nil {
d.data = nil
}
switch input := input.(type) {
case []byte:
d.data = input

Loading…
Cancel
Save