mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
If nil, type doesn't matter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user