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 | go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.gz go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.bz2 go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.lz go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.xz go-tangerine-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.zst go-tangerine-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 |