Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gorgeous-pianos-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-voronoi-container": patch
---

Replace lodash isString with native equivalent
6 changes: 4 additions & 2 deletions packages/victory-voronoi-container/src/voronoi-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Collection, Selection, Data, Helpers } from "victory-core";
import { isEmpty, isString, isRegExp, throttle } from "lodash";
import { isEmpty, isRegExp, throttle } from "lodash";
import isEqual from "react-fast-compare";
import Delaunay from "delaunay-find/lib/index.js";
import React from "react";
Expand Down Expand Up @@ -66,7 +66,9 @@ class VoronoiHelpersClass {
const childProps = child.props || {};
const name = childProps.name || childName;
const blacklist = props.voronoiBlacklist || [];
const blacklistStr = blacklist.filter(isString);
const blacklistStr = blacklist.filter(
(value) => !!value && typeof value.valueOf() === "string",
);
const blacklistRegExp = blacklist.filter(isRegExp);
const isRegExpMatch = blacklistRegExp.some((regExp) => regExp.test(name));
if (
Expand Down