mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Fix handling of users without userId
This commit is contained in:
parent
a8389bd0b6
commit
8a5ce08c00
1 changed files with 5 additions and 5 deletions
10
src/keys.js
10
src/keys.js
|
@ -151,15 +151,15 @@ const process = (publicKey) => {
|
|||
users.forEach((user, i) => {
|
||||
usersOutput[i] = {
|
||||
userData: {
|
||||
id: user.userId.userid,
|
||||
name: user.userId.name,
|
||||
email: user.userId.email,
|
||||
comment: user.userId.comment,
|
||||
id: user.userId ? user.userId.userid : null,
|
||||
name: user.userId ? user.userId.name : null,
|
||||
email: user.userId ? user.userId.email : null,
|
||||
comment: user.userId ? user.userId.comment : null,
|
||||
isPrimary: primaryUser.index === i,
|
||||
},
|
||||
}
|
||||
|
||||
if ('selfCertifications' in user && user.selfCertifications.length >= 0) {
|
||||
if ('selfCertifications' in user && user.selfCertifications.length > 0) {
|
||||
const notations = user.selfCertifications[0].rawNotations
|
||||
usersOutput[i].notations = notations.map(
|
||||
({ name, value, humanReadable }) => {
|
||||
|
|
Loading…
Reference in a new issue