Merge pull request #63 from s72785/patch-7

prevent NaN fixes usability glitch
This commit is contained in:
rys ostrovid 2015-06-02 19:44:41 +02:00
commit f1927d7452

View file

@ -8,5 +8,5 @@ calling like
*/
function crmnt( e, i ) { /* read: in-/decrement ( dom-element, signed-integer ) */
var d = parseInt( e.value ) + i;
e.value = ( d <= 0 )? 0 : d;
e.value = ( d <= 0 || isNaN(d) )? 0 : d;
}