From b82eb1a7888ac1c2fcaa98c734f12b15afb0ab14 Mon Sep 17 00:00:00 2001 From: Wolfgang <39681420+LucasWolfgang@users.noreply.github.com> Date: Sat, 23 Apr 2022 14:20:36 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=B2=20Changed=20ColorRange=20val=20typ?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using const for val causes the action to fail if it is out of bounds. It can happen in cases were these values are estimated, but not known in advance, such as max number of errors. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 241a7f7..773efc3 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ try { if (minColorRange != '' && maxColorRange != '' && valColorRange != '') { const max = parseFloat(maxColorRange); const min = parseFloat(minColorRange); - const val = parseFloat(valColorRange); + let val = parseFloat(valColorRange); if (val < min) val = min; if (val > max) val = max;