fhemweb.js: avoid the crash on the "home" page

git-svn-id: https://svn.fhem.de/fhem/trunk@5150 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-03-06 19:27:43 +00:00
parent 1bd2d5c101
commit 69e405f416

View File

@@ -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");