diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx index 73a49f0072c..ecaa0e3372d 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx +++ b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.test.tsx @@ -1,6 +1,6 @@ import React, { ChangeEvent } from 'react'; import { mount } from 'enzyme'; -import { ThresholdsEditor, Props, threshodsWithoutKey } from './ThresholdsEditor'; +import { ThresholdsEditor, Props, thresholdsWithoutKey } from './ThresholdsEditor'; import { colors } from '../../utils'; const setup = (propOverrides?: Partial) => { @@ -21,7 +21,7 @@ const setup = (propOverrides?: Partial) => { }; function getCurrentThresholds(editor: ThresholdsEditor) { - return threshodsWithoutKey(editor.state.thresholds); + return thresholdsWithoutKey(editor.state.thresholds); } describe('Render', () => { diff --git a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx index 8a381ea4f60..dc6b7853c7e 100644 --- a/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx +++ b/packages/grafana-ui/src/components/ThresholdsEditor/ThresholdsEditor.tsx @@ -155,7 +155,7 @@ export class ThresholdsEditor extends PureComponent { onChange = () => { const { thresholds } = this.state; - this.props.onChange(threshodsWithoutKey(thresholds)); + this.props.onChange(thresholdsWithoutKey(thresholds)); }; renderInput = (threshold: ThresholdWithKey) => { @@ -231,7 +231,7 @@ export class ThresholdsEditor extends PureComponent { } } -export function threshodsWithoutKey(thresholds: ThresholdWithKey[]): Threshold[] { +export function thresholdsWithoutKey(thresholds: ThresholdWithKey[]): Threshold[] { return thresholds.map(t => { const { key, ...rest } = t; return rest; // everything except key