diff --git a/src/TTN/packed_decoder.js b/src/TTN/packed_decoder.js index 331024d1..c8f319a2 100644 --- a/src/TTN/packed_decoder.js +++ b/src/TTN/packed_decoder.js @@ -5,6 +5,10 @@ function Decoder(bytes, port) { var decoded = {}; + if (bytes.length === 0) { + return {}; + } + if (port === 1) { // only wifi counter data, no gps if (bytes.length === 2) {