Skip to content

Commit 09a4a22

Browse files
authored
fix: Remove use of structuredClone (#3766)
1 parent c34d9c1 commit 09a4a22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ui/SunburstChart/SunburstChart.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ function SunburstChart({
4444
// if the node has children, process them
4545
if (Array.isArray(node.children)) {
4646
currentNode.children = node.children.map((child) => {
47-
const newChild = structuredClone(child)
47+
// sad ... some browsers still lack support for structuredClone
48+
const newChild = JSON.parse(JSON.stringify(child))
4849
Object.assign(newChild, { value: selectorHandler.current(child) })
4950

5051
nodeMap.set(child, newChild)

0 commit comments

Comments
 (0)