aboutsummaryrefslogtreecommitdiffstats
path: root/web/nms.gathering.org/js/nms-map-handlers.js
diff options
context:
space:
mode:
authorNicolai Tellefsen <niccofyren@gmail.com>2016-03-01 21:58:08 +0000
committerNicolai Tellefsen <niccofyren@gmail.com>2016-03-01 21:58:08 +0000
commitfb47ad1cd7c8b7aabe6098ca0d092df5e698b691 (patch)
tree6448229f47296bfe1fb3e012448f15c2d2a3e99a /web/nms.gathering.org/js/nms-map-handlers.js
parent4b7b0605dd15557df076a904a72e6bca7b5ebefa (diff)
Stop trafficUpdater() from passing along NaN values
Diffstat (limited to 'web/nms.gathering.org/js/nms-map-handlers.js')
-rw-r--r--web/nms.gathering.org/js/nms-map-handlers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/nms.gathering.org/js/nms-map-handlers.js b/web/nms.gathering.org/js/nms-map-handlers.js
index ddb50a1..eaa62fd 100644
--- a/web/nms.gathering.org/js/nms-map-handlers.js
+++ b/web/nms.gathering.org/js/nms-map-handlers.js
@@ -163,7 +163,8 @@ function trafficUpdater()
speed += (parseInt(t["ifhcinoctets"]) -parseInt(n["ifhcinoctets"])) / (parseInt(t["time"] - n["time"]));
}
}
- setSwitchColor(sw,colorFromSpeed(speed));
+ if(!isNaN(speed))
+ setSwitchColor(sw,colorFromSpeed(speed));
}
}