From f2a1260294b25a31452fd00fe59820467f5cd86a Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 21 Feb 2014 12:36:22 +0100 Subject: Nil is also considered empty --- ethutil/value.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethutil') 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 -- cgit v1.2.3