From 5b2887c619b3cd532e03d80ffdc39cc5ee954038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me?= Date: Tue, 12 Nov 2024 23:22:46 +0100 Subject: [PATCH] add check to 0190-WebUI-Fix-AddMissingExtendedChannelDescriptions WebUI patch if chn exists (#2912, @jp112sdl) --- ...AddMissingExtendedChannelDescriptions.patch | 18 ++++++++++++++++++ .../occu/WebUI/www/webui/webui.js | 6 ++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch index bd653262d2..c6eb036ad7 100644 --- a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch +++ b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions.patch @@ -20,3 +20,21 @@ if (chType == "KEY_TRANSCEIVER") { if (deviceType.toLowerCase().indexOf("hmip-asir") != -1) { +@@ -35609,13 +35609,15 @@ + typeExt = "_" + multiMode; + } else { + if (channelAddress != "undefined") { +- var chn = DeviceList.getChannelByAddress(channelAddress), +- chnMode = parseInt(chn.multiMode); ++ var chn = DeviceList.getChannelByAddress(channelAddress); ++ if (typeof chn != "undefined") { ++ var chnMode = parseInt(chn.multiMode); + if (! isNaN(chnMode)) { + typeExt = "_" + chnMode; + } else { + typeExt = ""; + } ++ } + } else { + typeExt = "_1"; + } diff --git a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js index 73048d30ff..24a452d269 100755 --- a/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js +++ b/buildroot-external/patches/occu/0190-WebUI-Fix-AddMissingExtendedChannelDescriptions/occu/WebUI/www/webui/webui.js @@ -35609,13 +35609,15 @@ getExtendedDescription = function(oChannelDescr) { typeExt = "_" + multiMode; } else { if (channelAddress != "undefined") { - var chn = DeviceList.getChannelByAddress(channelAddress), - chnMode = parseInt(chn.multiMode); + var chn = DeviceList.getChannelByAddress(channelAddress); + if (typeof chn != "undefined") { + var chnMode = parseInt(chn.multiMode); if (! isNaN(chnMode)) { typeExt = "_" + chnMode; } else { typeExt = ""; } + } } else { typeExt = "_1"; }