fix: syntax

This commit is contained in:
Yarmo Mackenbach 2023-08-31 14:50:50 +02:00
parent 1373f14587
commit 35c1dbc13d
No known key found for this signature in database
GPG key ID: 3C57D093219103A3

View file

@ -105,13 +105,10 @@ const fetchWKD = (id) => {
try { try {
profile = await doipjs.openpgp.parsePublicKey(publicKey) profile = await doipjs.openpgp.parsePublicKey(publicKey)
} catch (error) { } catch (error) {
profile = null
}
if (!profile) {
reject(new Error('No public keys could be fetched using WKD')) reject(new Error('No public keys could be fetched using WKD'))
return return
} }
profile.publicKey.fetch.method = 'wkd' profile.publicKey.fetch.method = 'wkd'
profile.publicKey.fetch.query = id profile.publicKey.fetch.query = id
profile.publicKey.fetch.resolvedUrl = fetchURL profile.publicKey.fetch.resolvedUrl = fetchURL