do not crash for unwrapErrs return nil (#15456)

fixes #15454
This commit is contained in:
Harshavardhana 2022-08-02 15:10:11 -07:00 committed by GitHub
parent 53a816b17a
commit 026b87e39b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,9 @@ func unwrapErrs(err error) (leafErr error) {
break
}
}
if uerr == nil {
leafErr = err
}
return leafErr
}