60_Watches: avoid JS error which appeared in seldom cases

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@23499 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2021-01-09 13:55:39 +00:00
parent 89a767953e
commit e7df57aad8

View File

@ -55,7 +55,7 @@ BEGIN {
readingsEndUpdate readingsEndUpdate
readingFnAttributes readingFnAttributes
readingsSingleUpdate readingsSingleUpdate
sortTopicNum sortTopicNum
) )
); );
@ -561,13 +561,13 @@ sub FWebFn {
my $hash = $defs{$d}; my $hash = $defs{$d};
my $alias = AttrVal($d, "alias", $d); # Linktext als Aliasname oder Devicename setzen my $alias = AttrVal($d, "alias", $d); # Linktext als Aliasname oder Devicename setzen
my $dlink = qq{<a href="/fhem?detail=$d">$alias</a>}; my $dlink = qq{<a href="$FW_ME?detail=$d">$alias</a>};
my $ret = ""; my $ret = "";
$ret .= "<span>$dlink </span><br>" if(!AttrVal($d,"hideDisplayName",0)); $ret .= "<span>$dlink </span><br>" if(!AttrVal($d,"hideDisplayName",0));
if(IsDisabled($d)) { if(IsDisabled($d)) {
if(AttrVal($d,"hideDisplayName",0)) { if(AttrVal($d,"hideDisplayName",0)) {
$ret .= qq{Watch <a href="/fhem?detail=$d">$d</a> is disabled}; $ret .= qq{Watch <a href="$FW_ME?detail=$d">$d</a> is disabled};
} }
else { else {
$ret .= "<html>Watch is disabled</html>"; $ret .= "<html>Watch is disabled</html>";