mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
Handle user identities without userId or email
This commit is contained in:
parent
2f37a69ba8
commit
f47001a41e
1 changed files with 6 additions and 4 deletions
|
@ -215,10 +215,12 @@ async function displayProfile(opts) {
|
|||
feedback += `<div class="profileDataItem__value">general information</div>`;
|
||||
feedback += `</div>`;
|
||||
for (var i = 0; i < keyData.publicKey.users.length; i++) {
|
||||
feedback += `<div class="profileDataItem">`;
|
||||
feedback += `<div class="profileDataItem__label">email</div>`;
|
||||
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
||||
feedback += `</div>`;
|
||||
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId) {
|
||||
feedback += `<div class="profileDataItem">`;
|
||||
feedback += `<div class="profileDataItem__label">email</div>`;
|
||||
feedback += `<div class="profileDataItem__value"><a href="mailto:${keyData.publicKey.users[i].userId.email}">${keyData.publicKey.users[i].userId.email}</a></div>`;
|
||||
feedback += `</div>`;
|
||||
}
|
||||
}
|
||||
feedback += `<div class="profileDataItem">`;
|
||||
feedback += `<div class="profileDataItem__label">fingerprint</div>`;
|
||||
|
|
Loading…
Reference in a new issue