diff --git a/invoker.go b/invoker.go index c7f60ec..7384beb 100644 --- a/invoker.go +++ b/invoker.go @@ -45,7 +45,8 @@ func (i *invoker) Invoke(fn any) (InvokeResult, error) { if index == len(fnOutArgs)-1 { // And type of the value is the error. if fnOut.Type().Implements(errorType) { - // Use the value as an error. Perform safe type conversion to avoid panics. + // Use the value as an error. + // Ignore failed cast of nil error. result.err, _ = fnOut.Interface().(error) } }