Skip to content

Commit

Permalink
fix(pf3): fix usage of noop in BulletChart (patternfly#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuler authored and tlabaj committed Dec 18, 2018
1 parent 7f4c438 commit c73490d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { patternfly } from '../../../common/patternfly';
import { Tooltip } from '../../Tooltip/index';
import { helpers } from '../../../common/helpers';
import { noop } from '../../../common/helpers';

import BulletChartValue from './BulletChartValue';
import BulletChartRange from './BulletChartRange';
Expand Down Expand Up @@ -147,7 +147,7 @@ const BulletChart = ({
return <Tooltip id={value.tooltipId || randomId()}>{tipText}</Tooltip>;
};

const legendTextFunction = value.legendTextFunction || helpers.noop;
const legendTextFunction = value.legendTextFunction || noop;
return (
<BulletChartLegendItem
key={`value-${index}`}
Expand All @@ -169,7 +169,7 @@ const BulletChart = ({
return <Tooltip id={range.tooltipId || randomId()}>{tipText}</Tooltip>;
};

const legendTextFunction = range.legendTextFunction || helpers.noop;
const legendTextFunction = range.legendTextFunction || noop;

return (
<BulletChartLegendItem
Expand Down Expand Up @@ -379,11 +379,11 @@ BulletChart.defaultProps = {
useExtendedColors: false,
thresholdWarning: 70,
thresholdWarningLegendText: null,
thresholdWarningLegendTextFunction: helpers.noop,
thresholdWarningLegendTextFunction: noop,
thresholdWarningTooltipFunction: null,
thresholdError: 90,
thresholdErrorLegendText: null,
thresholdErrorLegendTextFunction: helpers.noop,
thresholdErrorLegendTextFunction: noop,
thresholdErrorTooltipFunction: null,
ranges: null,
showAxis: true,
Expand Down

0 comments on commit c73490d

Please sign in to comment.