fhemweb.js: scriptAttribute bugfix (empty param on Chrome)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-04-08 11:02:53 +00:00
parent 4b64fc2edf
commit dc43201dfe

View File

@@ -347,7 +347,13 @@ scriptAttribute(sname)
});
var ua={};
try {ua=JSON.parse(attr);} catch(e){FW_errmsg(sname+" Parameter "+e,5000);}
if(attr && attr != "") {
try {
ua=JSON.parse(attr);
} catch(e){
FW_errmsg(sname+" Parameter "+e,5000);
}
}
return ua;
}
// end of script functions