From 970b4d3a8fe353d8fc890b506ac83e4ae70d9d2f Mon Sep 17 00:00:00 2001 From: Markus Michels Date: Mon, 5 Feb 2024 19:35:30 +0100 Subject: [PATCH] Fix check to avoid crash (#16371) Signed-off-by: Markus Michels --- .../src/main/resources/scripts/oh-blu-scanner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.3