Skip to content

Commit 3d6f8ad

Browse files
authored
Replace lodash isString with native equivalent (#2827)
1 parent 6f24b89 commit 3d6f8ad

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/gorgeous-pianos-deliver.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"victory-voronoi-container": patch
3+
---
4+
5+
Replace lodash isString with native equivalent

packages/victory-voronoi-container/src/voronoi-helpers.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Collection, Selection, Data, Helpers } from "victory-core";
2-
import { isEmpty, isString, isRegExp, throttle } from "lodash";
2+
import { isEmpty, isRegExp, throttle } from "lodash";
33
import isEqual from "react-fast-compare";
44
import Delaunay from "delaunay-find/lib/index.js";
55
import React from "react";
@@ -66,7 +66,9 @@ class VoronoiHelpersClass {
6666
const childProps = child.props || {};
6767
const name = childProps.name || childName;
6868
const blacklist = props.voronoiBlacklist || [];
69-
const blacklistStr = blacklist.filter(isString);
69+
const blacklistStr = blacklist.filter(
70+
(value) => !!value && typeof value.valueOf() === "string",
71+
);
7072
const blacklistRegExp = blacklist.filter(isRegExp);
7173
const isRegExpMatch = blacklistRegExp.some((regExp) => regExp.test(name));
7274
if (

0 commit comments

Comments
 (0)