diff options
author | mariusor | 2022-11-04 19:01:11 +0100 |
---|---|---|
committer | mariusor | 2022-11-04 19:01:11 +0100 |
commit | f052192b39ff2f330d62bfa407da3f71ce651c4d (patch) | |
tree | 6467b3a2f088d064a2bb4d71dc37a8bad0d9d69c | |
parent | 066cec4feed7169dbf46d8b1bc62f31cd748dead (diff) |
Fix IsNil for unrecognized types
-rw-r--r-- | item.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -146,7 +146,7 @@ func IsNil(it Item) bool { // NOTE(marius): we're not dealing with a type that we know about, so we use slow reflection // as we still care about the result v := reflect.ValueOf(it) - isNil = v.Kind() != reflect.Pointer || v.IsNil() + isNil = v.Kind() == reflect.Pointer && v.IsNil() } return isNil } |