From 3dcfefc1c3b584834fb23d3f74fa99a0700c5512 Mon Sep 17 00:00:00 2001 From: Kirill Tronin Date: Fri, 14 Oct 2022 17:03:28 +0700 Subject: [PATCH] bug: temporary fix strange bug --- src/endpoints.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/endpoints.js b/src/endpoints.js index 0fec9bc..f3830d0 100644 --- a/src/endpoints.js +++ b/src/endpoints.js @@ -93,6 +93,11 @@ const getChainData = (registryName) => { const reportStats = (networkName, rpc, result) => { let key = `${networkName}/${rpc}`; let endp = endpointRankings[networkName].get(key); + + //todo fix this + if (!endp) + return; + endpointRankings[networkName].set(key, result ? { ...endp, ok: ++endp.ok } : { ...endp, fail: ++endp.fail }); }