Skip to content

Commit

Permalink
check for undefined privateKey instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Novak committed Apr 16, 2024
1 parent 9717c2e commit 26b661e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/signed-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export class SignedXml {
const signedInfoCanon = this.getCanonSignedInfoXml(doc);
const signer = this.findSignatureAlgorithm(this.signatureAlgorithm);
const privateKey = this.getPrivateKey();
if (privateKey == null) {
if (privateKey === undefined) {
throw new Error("Private key is required to compute signature");
}
if (typeof callback === "function") {
Expand Down

0 comments on commit 26b661e

Please sign in to comment.