packed_decoder.js: errorhandling NULL input

This commit is contained in:
Klaus K Wilting 2018-12-16 15:38:59 +01:00
parent 74ac3f8525
commit 9e079fe642

View File

@ -5,6 +5,10 @@ function Decoder(bytes, port) {
var decoded = {}; var decoded = {};
if (bytes.length === 0) {
return {};
}
if (port === 1) { if (port === 1) {
// only wifi counter data, no gps // only wifi counter data, no gps
if (bytes.length === 2) { if (bytes.length === 2) {