Skip to content

Commit

Permalink
fix: remove nullish coalescing operator
Browse files Browse the repository at this point in the history
fixes #236
  • Loading branch information
mirceanis committed Jun 29, 2022
1 parent da2bf59 commit 94ecaad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xc20pEncryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export async function resolveX25519Encrypters(dids: string[], resolver: Resolvab
agreementKeys?.filter((key) => {
// TODO: should be able to use non base58 keys too
return key.type === 'X25519KeyAgreementKey2019' && Boolean(key.publicKeyBase58)
}) ?? []
}) || []
if (!pks.length && !controllerEncrypters.length)
throw new Error(`no_suitable_keys: Could not find x25519 key for ${did}`)
return pks
Expand Down

0 comments on commit 94ecaad

Please sign in to comment.