浏览代码

Make sure we do not change -Infinity

Hugo Häggmark 7 年之前
父节点
当前提交
c17ccf2289
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx

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