aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-21 19:36:22 +0800
committerobscuren <geffobscura@gmail.com>2014-02-21 19:36:22 +0800
commitf2a1260294b25a31452fd00fe59820467f5cd86a (patch)
tree6663864861ffc5d9ce6b27544b9f72e80f91aceb /ethutil
parent06ea7fc8308265e80b24352f676315ed4c826b6a (diff)
downloaddexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.gz
dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.tar.zst
dexon-f2a1260294b25a31452fd00fe59820467f5cd86a.zip
Nil is also considered empty
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/value.go2
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