Fix to preserve types using structuredClone (#3113)

This commit is contained in:
Jonathan Tran
2024-07-25 20:11:46 -04:00
committed by GitHub
parent 0e5d88df0b
commit e3b8807d6f
17 changed files with 76 additions and 87 deletions

View File

@ -38,7 +38,7 @@ export function updatePathToNodeFromMap(
oldPath: PathToNode,
pathToNodeMap: { [key: number]: PathToNode }
): PathToNode {
const updatedPathToNode = JSON.parse(JSON.stringify(oldPath))
const updatedPathToNode = structuredClone(oldPath)
let max = 0
Object.values(pathToNodeMap).forEach((path) => {
const index = Number(path[1][0])