Prevent addition of thresholds with a nonexistent color

pull/10616/head
Alex P 2017-12-08 14:39:40 -08:00
parent 3c95ba9f37
commit d595f8eaa8
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class CellEditorOverlay extends Component {
const sortedColors = _.sortBy(colors, color => Number(color.value))
if (sortedColors.length <= MAX_THRESHOLDS) {
const randomColor = _.random(0, GAUGE_COLORS.length)
const randomColor = _.random(0, GAUGE_COLORS.length - 1)
const maxValue =
cellWorkingType === 'gauge'