Handle empty email

This commit is contained in:
Yarmo Mackenbach 2020-07-02 09:13:22 +02:00
parent f47001a41e
commit d878cb8735

View file

@ -215,7 +215,7 @@ async function displayProfile(opts) {
feedback += `<div class="profileDataItem__value">general information</div>`;
feedback += `</div>`;
for (var i = 0; i < keyData.publicKey.users.length; i++) {
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId) {
if (keyData.publicKey.users[i].userId && 'email' in keyData.publicKey.users[i].userId && keyData.publicKey.users[i].userId.email) {
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>`;