forked from Mirrors/doipjs
Fix handling users without selfCertifications
This commit is contained in:
parent
47e538770c
commit
32c01756d3
1 changed files with 11 additions and 7 deletions
18
src/keys.js
18
src/keys.js
|
@ -159,14 +159,18 @@ const process = (publicKey) => {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const notations = user.selfCertifications[0].rawNotations
|
if ('selfCertifications' in user && user.selfCertifications.length >= 0) {
|
||||||
usersOutput[i].notations = notations.map(
|
const notations = user.selfCertifications[0].rawNotations
|
||||||
({ name, value, humanReadable }) => {
|
usersOutput[i].notations = notations.map(
|
||||||
if (humanReadable && name === 'proof@metacode.biz') {
|
({ name, value, humanReadable }) => {
|
||||||
return openpgp.util.decode_utf8(value)
|
if (humanReadable && name === 'proof@metacode.biz') {
|
||||||
|
return openpgp.util.decode_utf8(value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
} else {
|
||||||
|
usersOutput[i].notations = []
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
|
|
Loading…
Reference in a new issue