From 956b9501f6fc73f2a2588805133372f2a5bfc1bf Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 3 Jul 2020 12:18:49 +0200 Subject: [PATCH] Prevent code execution if no notations present --- assets/scripts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/scripts.js b/assets/scripts.js index 2b262ce..9d8ce44 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -296,6 +296,11 @@ async function displayProfile(opts) { // Display feedback document.body.querySelector('#profileData').innerHTML = feedback; + // Exit if no notations are available + if (keyData.notations.length == 0) { + return; + } + // Verify identity proofs for (var i = 0; i < keyData.notations.length; i++) { notation = keyData.notations[i];