diff --git a/lib/DataIntegrityProof.js b/lib/DataIntegrityProof.js index a6b6a01..f0d03d3 100644 --- a/lib/DataIntegrityProof.js +++ b/lib/DataIntegrityProof.js @@ -296,7 +296,7 @@ export class DataIntegrityProof extends LinkedDataProof { const previousProofs = Array.isArray(proof.previousProof) ? proof.previousProof : [proof.previousProof]; if(!previousProofs.every(proofId => - proofSet.some(proof => proof.id === proofId))) { + proofSet.some(proof => proof?.id === proofId))) { throw new Error( `Unable to find previousProof ${proof.previousProof}`); }