File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -355,21 +355,20 @@ async function _verifyCredential(options = {}) {
355355 log . push ( { id : 'valid_signature' , valid : true } ) ;
356356 log . push ( { id : 'issuer_did_resolves' , valid : true } ) ;
357357
358- // if credential status is provided, a `checkStatus` function must be given
359- if ( credential . credentialStatus && typeof checkStatus !== 'function' ) {
360- throw new TypeError (
361- 'A "checkStatus" function must be given to verify credentials with ' +
362- '"credentialStatus".' ) ;
363- }
364-
365- if ( credential . credentialStatus ) {
366- await addStatusInfoToLog ( { options, result, log} ) ;
367- }
368-
358+ // if credential status is provided, a `checkStatus` function must be given
359+ if ( credential . credentialStatus && typeof checkStatus !== 'function' ) {
360+ throw new TypeError (
361+ 'A "checkStatus" function must be given to verify credentials with ' +
362+ '"credentialStatus".' ) ;
363+ }
364+
365+ if ( credential . credentialStatus ) {
366+ await addStatusInfoToLog ( { options, result, log} ) ;
367+ }
368+
369369 // run common credential checks (add check results to log)
370370 _checkCredential ( { credential, log, now} ) ;
371371
372-
373372 result . log = log ;
374373 if ( result . results ) {
375374 result . results [ 0 ] . log = log ;
You can’t perform that action at this time.
0 commit comments