Skip to content

Commit

Permalink
fix: Remove null check
Browse files Browse the repository at this point in the history
  • Loading branch information
oed committed Mar 10, 2021
1 parent 3af4d5f commit 9694c81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class DID {
const kid = base64urlToJSON(jws.split('.')[0]).kid as string
if (!kid) throw new Error('No "kid" found in jws')
const didResolutionResult = await this.resolve(kid)
const publicKeys = didResolutionResult.didDocument!.verificationMethod || []
const publicKeys = didResolutionResult.didDocument?.verificationMethod || []
// verifyJWS will throw an error if the signature is invalid
verifyJWS(jws, publicKeys)
let payload
Expand Down

0 comments on commit 9694c81

Please sign in to comment.