From 7fff67068367b18c4ddb6d49bd01949f22c6573c Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 18 Sep 2018 07:45:53 -0500 Subject: [PATCH] Fix clamp undefined min/max --- manage/config-dialog.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manage/config-dialog.js b/manage/config-dialog.js index b7f8f5f9..8f2ba6b1 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -328,9 +328,8 @@ function configDialog(style) { // Clamp input[type=number] to a valid range function clampValue(value, va) { - const min = typeof va.min === 'undefined' ? 0 : va.min; - const max = typeof va.max === 'undefined' ? 100 : va.max; - if (value < min) { + const max = isNumber(va.max) ? va.max : 100; + if (isNumber(va.min) && value < va.min) { return min; } if (value > max) {