Skip to content

Commit

Permalink
Add exception for undefined VC or VC.proof.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Oct 29, 2024
1 parent b91ed92 commit 561f041
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export function setupRow() {
}

export function getProofs(issuedVc) {
// if the implementation failed to issue a VC or sign the VC return
// an empty array
if(!issuedVc?.proof) {
return [];
}
const proofs = Array.isArray(issuedVc?.proof) ?
issuedVc.proof : [issuedVc?.proof];
return proofs;
Expand Down

0 comments on commit 561f041

Please sign in to comment.