Make sure we do not change -Infinity

This commit is contained in:
Hugo Häggmark 2019-01-18 07:10:00 +01:00
parent 5448b72f7c
commit c17ccf2289

View File

@ -105,7 +105,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
const value = isNaN(parsedValue) ? null : parsedValue;
const newThresholds = thresholds.map(t => {
if (t === threshold) {
if (t === threshold && t.index !== 0) {
t = { ...t, value: value as number };
}