Browse Source

Make sure we do not change -Infinity

Hugo Häggmark 7 years ago
parent
commit
c17ccf2289

+ 1 - 1
packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx

@@ -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 };
       }