Skip to content

Commit

Permalink
add check to 0190-WebUI-Fix-AddMissingExtendedChannelDescriptions Web…
Browse files Browse the repository at this point in the history
…UI patch if chn exists (#2912, @jp112sdl)
  • Loading branch information
jp112sdl authored Nov 12, 2024
1 parent 6e7ad3f commit 5b2887c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit 5b2887c

Please sign in to comment.