From: Markus Michels Date: Mon, 5 Feb 2024 18:35:30 +0000 (+0100) Subject: Fix check to avoid crash (#16371) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=970b4d3a8fe353d8fc890b506ac83e4ae70d9d2f;p=openhab-addons.git Fix check to avoid crash (#16371) Signed-off-by: Markus Michels --- diff --git a/bundles/org.openhab.binding.shelly/src/main/resources/scripts/oh-blu-scanner.js b/bundles/org.openhab.binding.shelly/src/main/resources/scripts/oh-blu-scanner.js index 005f85860d..b4f29469c5 100644 --- a/bundles/org.openhab.binding.shelly/src/main/resources/scripts/oh-blu-scanner.js +++ b/bundles/org.openhab.binding.shelly/src/main/resources/scripts/oh-blu-scanner.js @@ -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; }