diff --git a/js/usercss.js b/js/usercss.js index 54d41526..720ac3fb 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -226,7 +226,7 @@ var usercss = (() => { result.default = range[0]; result.min = range[1]; result.max = range[2]; - result.step = range[3] || 1; + result.step = range[3] == 0 ? 1 : range[3]; } break; } diff --git a/manage/config-dialog.js b/manage/config-dialog.js index 2e2f0988..d749fada 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -317,8 +317,8 @@ function configDialog(style) { // Clamp input[type=number] to a valid range function clampValue(value, va) { - const min = va.min || 0; - const max = va.max || 100; + const min = typeof va.min === 'undefined' ? 0 : va.min; + const max = typeof va.max === 'undefined' ? 100 : va.max; if (value < min) { return min; }