Fix default values

This commit is contained in:
Rob Garrison 2018-09-17 22:22:57 -05:00
parent d136fdbafa
commit 7be33a9237
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}