mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
If nil, type doesn't matter
This commit is contained in:
parent
ac03ff6f05
commit
bea3879d6f
1 changed files with 3 additions and 0 deletions
|
|
@ -45,6 +45,9 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) {
|
||||||
func newHexData(input interface{}) *hexdata {
|
func newHexData(input interface{}) *hexdata {
|
||||||
d := new(hexdata)
|
d := new(hexdata)
|
||||||
|
|
||||||
|
if input == nil {
|
||||||
|
d.data = nil
|
||||||
|
}
|
||||||
switch input := input.(type) {
|
switch input := input.(type) {
|
||||||
case []byte:
|
case []byte:
|
||||||
d.data = input
|
d.data = input
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue