Prevent addition of thresholds with a nonexistent color
parent
3c95ba9f37
commit
d595f8eaa8
|
@ -79,7 +79,7 @@ class CellEditorOverlay extends Component {
|
||||||
const sortedColors = _.sortBy(colors, color => Number(color.value))
|
const sortedColors = _.sortBy(colors, color => Number(color.value))
|
||||||
|
|
||||||
if (sortedColors.length <= MAX_THRESHOLDS) {
|
if (sortedColors.length <= MAX_THRESHOLDS) {
|
||||||
const randomColor = _.random(0, GAUGE_COLORS.length)
|
const randomColor = _.random(0, GAUGE_COLORS.length - 1)
|
||||||
|
|
||||||
const maxValue =
|
const maxValue =
|
||||||
cellWorkingType === 'gauge'
|
cellWorkingType === 'gauge'
|
||||||
|
|
Loading…
Reference in New Issue