Commit f2a12602 authored by obscuren's avatar obscuren

Nil is also considered empty

parent 06ea7fc8
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment