Fix: call of reflect.Value.Interface on zero Value (#1067)

panic: reflect: call of reflect.Value.Interface on zero Value

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX 2022-03-22 10:03:36 +01:00 committed by GitHub
parent 5083284deb
commit 380bd581b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,7 +195,7 @@ func (impl *interperterImpl) evaluateArrayDeref(arrayDerefNode *actionlint.Array
return nil, err
}
return reflect.ValueOf(left).Interface(), nil
return impl.getSafeValue(reflect.ValueOf(left)), nil
}
func (impl *interperterImpl) getPropertyValue(left reflect.Value, property string) (value interface{}, err error) {