Fix to preserve types using structuredClone (#3113)
This commit is contained in:
@ -38,8 +38,8 @@ export function addFillet(
|
||||
radius = createLiteral(5) as Value
|
||||
// shouldPipe = false, // TODO: Implement this feature
|
||||
): { modifiedAst: Program; pathToFilletNode: PathToNode } | Error {
|
||||
// close ast to make mutations safe
|
||||
let _node: Program = JSON.parse(JSON.stringify(node))
|
||||
// clone ast to make mutations safe
|
||||
let _node = structuredClone(node)
|
||||
|
||||
/**
|
||||
* Add Tag to the Segment Expression
|
||||
|
Reference in New Issue
Block a user