Slider: "on/off" causes NaN -> converted it to 0

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2821 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2013-02-27 09:55:55 +00:00
parent 7db9d96a4a
commit 0655dc3dcf
2 changed files with 3 additions and 0 deletions

View File

@@ -60,6 +60,8 @@ FW_doUpdate()
}
if(doSet) {
var val = d[1].replace(/^.*?(\d+).*/g, "$1"); // get first number
if(!val.match(/\d+/))
val = 0;
Slider(el, val);
}
}