Fix check to avoid crash (#16371)

Signed-off-by: Markus Michels <markus7017@gmail.com>
This commit is contained in:
Markus Michels 2024-02-05 19:35:30 +01:00 committed by Leo Siepel
parent 7c05e8f585
commit e2313e9801

View File

@ -94,7 +94,7 @@ let BTHomeDecoder = {
let _value;
while (buffer.length > 0) {
_bth = BTH[buffer.at(0)];
if (_bth === "undefined") {
if (typeof _bth === "undefined") {
console.log("BTH: unknown type");
break;
}