meshstats: fix NaN client count

This commit is contained in:
Milan Pässler 2016-05-22 00:25:46 +02:00
parent 31d1464805
commit 81379a8263

View file

@ -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