Skip to content

Commit 733755f

Browse files
authored
Merge pull request #224 from LukePrior/testing
handle single sonde
2 parents 78bdbde + cbfbb00 commit 733755f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/format.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ function formatData(data, live) {
88
response.positions = {};
99
var dataTemp = [];
1010
if (live) { // Websockets
11+
if (!data.length) { // handle single sonde
12+
data = {"entry": data};
13+
}
1114
for (let entry in data) {
1215
var dataTempEntry = {};
1316
var station = data[entry].uploader_callsign;

0 commit comments

Comments
 (0)