diff options
author | obscuren <geffobscura@gmail.com> | 2014-02-21 19:36:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-02-21 19:36:22 +0800 |
commit | f2a1260294b25a31452fd00fe59820467f5cd86a (patch) | |
tree | 6663864861ffc5d9ce6b27544b9f72e80f91aceb /ethutil | |
parent | 06ea7fc8308265e80b24352f676315ed4c826b6a (diff) | |
download | dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.gz dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.bz2 dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.lz dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.xz dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.zst dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.zip |
Nil is also considered empty
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/value.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethutil/value.go b/ethutil/value.go index 03d23d559..3dd84d12d 100644 --- a/ethutil/value.go +++ b/ethutil/value.go @@ -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 |