mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-01 00:53:47 +00:00
Nil is also considered empty
This commit is contained in:
parent
06ea7fc830
commit
f2a1260294
1 changed files with 1 additions and 1 deletions
|
|
@ -150,7 +150,7 @@ func (val *Value) IsStr() bool {
|
|||
}
|
||||
|
||||
func (val *Value) IsEmpty() bool {
|
||||
return (val.IsSlice() || val.IsStr()) && val.Len() == 0
|
||||
return val.Val == nil || ((val.IsSlice() || val.IsStr()) && val.Len() == 0)
|
||||
}
|
||||
|
||||
// Threat the value as a slice
|
||||
|
|
|
|||
Loading…
Reference in a new issue