aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorsydeslyde <34600077+sydeslyde@users.noreply.github.com>2018-04-14 11:54:54 +0200
committersydeslyde <34600077+sydeslyde@users.noreply.github.com>2018-04-14 11:54:54 +0200
commit6e432e6d3bc4dab0dd32664344636c905e40c7c9 (patch)
tree3f129a89f18086093d4bdf699199ae16b4de6c99 /public
parenteb0185c03f8d5b68949798e8040b42a203b040a2 (diff)
downloadtplink-energy-monitor-6e432e6d3bc4dab0dd32664344636c905e40c7c9.tar.xz
tplink-energy-monitor-6e432e6d3bc4dab0dd32664344636c905e40c7c9.zip
added meaningful page when no devices discovered
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/dash.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/javascripts/dash.js b/public/javascripts/dash.js
index 821e9c1..e52992f 100644
--- a/public/javascripts/dash.js
+++ b/public/javascripts/dash.js
@@ -11,7 +11,9 @@ var dash = {
init: function(deviceId) {
this.deviceId = deviceId;
- $('.' + deviceId).addClass('active');
+ if (this.deviceId) {
+ $('.' + deviceId).addClass('active');
+ }
this.initRealtimeGauge();
this.initRealtimeTrendChart();