From 9111e1bbe194b426413e23d1f529573283d4db35 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Fri, 27 Mar 2020 13:10:05 +0100 Subject: [PATCH] fix --- token-validator/htdocs/js/adlin-dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/token-validator/htdocs/js/adlin-dashboard.js b/token-validator/htdocs/js/adlin-dashboard.js index 55fa646..4915fcc 100644 --- a/token-validator/htdocs/js/adlin-dashboard.js +++ b/token-validator/htdocs/js/adlin-dashboard.js @@ -75,10 +75,10 @@ angular.module("AdLinApp") if (login[0] == "$") return; tmpstats.total++; angular.forEach(challenges, function(ch, chid) { - if (ch.time) { + if (ch.time && challenges[chid] !== undefined) { challenges[chid].time = new Date(ch.time); challenges[chid].recent = (Date.now() - ch.time)/1000; - if (recent < challenges[chid].time) + if (recent < challenges[chid].time && tmpstats[chid] !== undefined) tmpstats[chid].success++; } if (tmpstats[chid] !== undefined)