Skip to content

Commit

Permalink
remove isFinit
Browse files Browse the repository at this point in the history
  • Loading branch information
HHongSeungWoo committed Oct 25, 2023
1 parent be919e1 commit a6e5863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/chart/generateCategoricalChart.tsx
Expand Up @@ -30,7 +30,7 @@ import {
import { CartesianAxis } from '../cartesian/CartesianAxis';
import { Brush } from '../cartesian/Brush';
import { getOffset } from '../util/DOMUtils';
import { findEntryInArray, getAnyElementOfObject, hasDuplicate, isFinit, isNumber, uniqueId } from '../util/DataUtils';
import { findEntryInArray, getAnyElementOfObject, hasDuplicate, isNumber, uniqueId } from '../util/DataUtils';
import {
appendOffsetOfLegend,
AxisStackGroups,
Expand Down Expand Up @@ -1862,7 +1862,7 @@ export const generateCategoricalChart = ({
const { xAxisMap, yAxisMap, offset } = this.state;
const { width, height } = this.props;
const xAxis = getAnyElementOfObject(xAxisMap);
const yAxisWithFiniteDomain = _.find(yAxisMap, axis => _.every(axis.domain, isFinit));
const yAxisWithFiniteDomain = _.find(yAxisMap, axis => _.every(axis.domain, Number.isFinite));
const yAxis = yAxisWithFiniteDomain || getAnyElementOfObject(yAxisMap);
const props = element.props || {};

Expand Down
4 changes: 0 additions & 4 deletions src/util/DataUtils.ts
Expand Up @@ -11,10 +11,6 @@ export const mathSign = (value: number) => {
return -1;
};

// use legacy isFinite only if there is a problem (aka IE)
// eslint-disable-next-line no-restricted-globals
export const isFinit = Number.isFinite ? Number.isFinite : isFinite;

export const isPercent = (value: string | number): value is `${number}%` =>
_.isString(value) && value.indexOf('%') === value.length - 1;

Expand Down

0 comments on commit a6e5863

Please sign in to comment.