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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5150 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-03-06 19:27:43 +00:00
parent 677bdf8283
commit df6dc6dc96

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