From f2c973096bcfeb5e0219fb8696fa8c3350f89fb8 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 18 Sep 2018 08:17:22 -0500 Subject: [PATCH] Fix clamp function --- manage/config-dialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manage/config-dialog.js b/manage/config-dialog.js index 1eb27b03..d22040eb 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -328,12 +328,11 @@ function configDialog(style) { // Clamp input[type=number] to a valid range function clampValue(value, va, break = false) { - const max = isNumber(va.max) ? va.max : 100; if (isNumber(va.min) && value < va.min) { - return min; + return va.min; } - if (value > max) { - return max; + if (isNumber(va.max) && value > va.max) { + return va.max; } // Don't restrict to integer values if step is undefined. if (!isNumber(va.step) || break) {