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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user