Prevent code execution if no notations present

This commit is contained in:
Yarmo Mackenbach 2020-07-03 12:18:49 +02:00
parent 2edf20f027
commit 956b9501f6

View file

@ -296,6 +296,11 @@ async function displayProfile(opts) {
// Display feedback // Display feedback
document.body.querySelector('#profileData').innerHTML = feedback; document.body.querySelector('#profileData').innerHTML = feedback;
// Exit if no notations are available
if (keyData.notations.length == 0) {
return;
}
// Verify identity proofs // Verify identity proofs
for (var i = 0; i < keyData.notations.length; i++) { for (var i = 0; i < keyData.notations.length; i++) {
notation = keyData.notations[i]; notation = keyData.notations[i];