Skip to content

Commit

Permalink
Fix Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed Jan 21, 2022
1 parent fc02977 commit 262a2ea
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,12 @@ function getColorStyling(
if (!isFinite(rangeMax) && value > stops[stops.length - 1]) {
rawIndex = stops.length - 1;
}

// in this case first stop is -Infinity
if (
!isFinite(rangeMin) &&
value < (isFinite(stops[0]) ? stops[0] : stops[1])
) {
if (!isFinite(rangeMin) && value < (isFinite(stops[0]) ? stops[0] : stops[1])) {
rawIndex = 0;
}
}


const colorIndex = rawIndex;

Expand Down

0 comments on commit 262a2ea

Please sign in to comment.