diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 911714fe1..82289e51f 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -139,9 +139,12 @@ FW_longpoll() filter=".*;iconPath="+name; } if(filter == "") { - var room = document.getElementById("content").getAttribute("room"); - if(room) - filter="room="+room; + var content = document.getElementById("content"); + if(content) { + var room = content.getAttribute("room"); + if(room) + filter="room="+room; + } } var iP = document.body.getAttribute("iconPath");