Skip to content

Commit 3e65cfb

Browse files
fixed bug with path infowindow
1 parent b170bcd commit 3e65cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ var mapInfoBox_handle_path_fetch = function(id,vehicle) {
12141214
html += "</div>";
12151215
html += "<div><b>Duration:&nbsp;</b>" + format_time_friendly(vehicle.start_time, convert_time(vehicle.curr_position.gps_time)) + "</div>";
12161216

1217-
if(Object.keys(JSON.parse(data.data)).length) {
1217+
if(Object.keys((typeof data.data === "string")?JSON.parse(data.data):data.data).length) {
12181218
html += "<hr style='margin:5px 0px'>";
12191219
html += habitat_data(data.data, true);
12201220
}

0 commit comments

Comments
 (0)