2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 01:46:08 +00:00

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

git-svn-id: https://svn.fhem.de/fhem/trunk@5486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-04-08 11:02:53 +00:00
parent e59709a493
commit 2d9f1c3212

View File

@ -347,7 +347,13 @@ scriptAttribute(sname)
}); });
var ua={}; 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; return ua;
} }
// end of script functions // end of script functions