diff --git a/lib/index.js b/lib/index.js index 61943245..f125adf3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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) { 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) { throw new Error('"credentialStatus" must include a type.'); } }