Skip to content

Commit

Permalink
allow credentialStatus arrays in check
Browse files Browse the repository at this point in the history
Signed-off-by: F-Node-Karlsruhe <[email protected]>
  • Loading branch information
F-Node-Karlsruhe authored and dlongley committed Nov 14, 2023
1 parent 03643b1 commit 6e20d13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@ export function _checkCredential({
}

if('credentialStatus' in credential) {
if(!credential.credentialStatus.id) {
if(Array.isArray(credential.credentialStatus) ? credential.credentialStatus.some(cs => !cs.id) : !credential.credentialStatus.id) {

Check failure on line 657 in lib/index.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

This line has a length of 135. Maximum allowed is 80
throw new Error('"credentialStatus" must include an id.');
}
if(!credential.credentialStatus.type) {
if(Array.isArray(credential.credentialStatus) ? credential.credentialStatus.some(cs => !cs.type) : !credential.credentialStatus.type) {

Check failure on line 660 in lib/index.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

This line has a length of 139. Maximum allowed is 80
throw new Error('"credentialStatus" must include a type.');
}
}
Expand Down

0 comments on commit 6e20d13

Please sign in to comment.