chore: fix isNil check (follow-up to #11442)

This commit is contained in:
andig 2024-01-04 14:34:25 +01:00
parent 7fa3d252c9
commit 5beb64428b

View file

@ -2,6 +2,7 @@ package provider
import (
"fmt"
"reflect"
"github.com/evcc-io/evcc/provider/golang"
"github.com/evcc-io/evcc/util"
@ -167,7 +168,7 @@ func (p *Go) evaluate() (res any, err error) {
return nil, err
}
if v.IsNil() {
if (v.Kind() == reflect.Pointer || v.Kind() == reflect.Interface) && v.IsNil() {
return nil, nil
}