2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

fhemweb.js: avoid error message for selects (Forum #124771)

git-svn-id: https://svn.fhem.de/fhem/trunk@25343 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-12-14 11:51:22 +00:00
parent 8785633c8f
commit 5dbe307f6f

View File

@ -1582,9 +1582,9 @@ FW_createSelect(elName, devName, vArr, currVal, set, params, cmd)
$(newEl).attr('name', elName);
if(cmd)
$(newEl).change(function(arg) { cmd($(newEl).val()) });
newEl.setValueFn = function(arg) {
newEl.setValueFn = function(arg) {
if(!vHash[arg] && typeof(arg) != "undefined")
arg = arg.replaceAll(" ","."); // Forum #124505
arg = (arg+"").replaceAll(" ","."); // Forum #124505
if(vHash[arg])
$(newEl).val(arg);
};