You've already forked dynamic-badges-action
🪲 Changed ColorRange val type
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.
This commit is contained in:
2
index.js
2
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;
|
||||
|
||||
Reference in New Issue
Block a user