From 81379a826362032520f1ad7e653bf284504bf559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Sun, 22 May 2016 00:25:46 +0200 Subject: [PATCH] meshstats: fix NaN client count --- lib/meshstats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meshstats.js b/lib/meshstats.js index f0ce186..3174eee 100644 --- a/lib/meshstats.js +++ b/lib/meshstats.js @@ -9,7 +9,7 @@ define(function () { var totalNewNodes = sum(d.nodes.new.map(one)) var totalLostNodes = sum(d.nodes.lost.map(one)) var totalClients = sum(d.nodes.all.filter(online).map( function (d) { - return d.statistics.clients + return d.statistics.clients ? d.statistics.clients : 0 })) var totalGateways = sum(d.nodes.all.filter(online).filter( function (d) { return d.flags.gateway