Skip to content

Commit d15b907

Browse files
suppress exceptions when graph is empty
1 parent 5cf4dd2 commit d15b907

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 146
2+
# version 149
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

js/plot_config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ function updateLegend() {
107107
});
108108
}
109109

110-
for (j = 0; j < dataset[0].data.length; ++j) {
111-
if (dataset[0].data[j][0] > pos.x) {
112-
break;
110+
if(dataset.length) {
111+
for (j = 0; j < dataset[0].data.length; ++j) {
112+
if (dataset[0].data[j][0] > pos.x) {
113+
break;
114+
}
113115
}
114116
}
115117

@@ -139,6 +141,8 @@ $(plot_holder).bind("dblclick", function () {
139141

140142
// limit range after selection
141143
$(plot_holder).bind("plotselected", function (event, ranges) {
144+
if(typeof ranges.xaxis == 'undefined') return;
145+
142146
plot = $.plot("#telemetry_graph .holder", plot.getData(), $.extend(true, plot_options, {
143147
xaxis: {
144148
min: ranges.xaxis.from,

0 commit comments

Comments
 (0)