diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/text/template/funcs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/text/template/funcs.go b/src/text/template/funcs.go index b5a8c9ec50..a949f896fa 100644 --- a/src/text/template/funcs.go +++ b/src/text/template/funcs.go @@ -478,7 +478,7 @@ func eq(arg1 reflect.Value, arg2 ...reflect.Value) (bool, error) { case k1 == uintKind && k2 == intKind: truth = arg.Int() >= 0 && arg1.Uint() == uint64(arg.Int()) default: - if arg1 != zero && arg != zero { + if arg1.IsValid() && arg.IsValid() { return false, errBadComparison } } |
