From bd5891a6d99489ad4317f5d899b635edbffbb0a5 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 20 Dec 2020 23:32:59 +0100 Subject: [PATCH] Filter claims with verification errors --- static/scripts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/scripts.js b/static/scripts.js index c2c7123..6e484f1 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -380,6 +380,7 @@ async function displayProfile(opts) { return; } + userId = userId.filter((a) => (a && a.errors.length == 0 && a.serviceproviderData)) userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0)); primaryClaims = userId @@ -425,6 +426,7 @@ async function displayProfile(opts) { return; } + userId = userId.filter((a) => (a && a.errors.length == 0 && a.serviceproviderData)) userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0)); if (primaryClaims && primaryClaims.toString() == userId.toString()) {