fix(core,nodes): use object assign to parse node

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-03-22 19:17:22 +01:00
committed by Braks
parent 94df4258a5
commit 04598cdcf6

View File

@@ -99,11 +99,7 @@ export function parseNode(node: Node, defaults: Partial<GraphNode> = {}): GraphN
}
}
return {
...initialState,
...(node as GraphNode),
id: node.id.toString(),
}
return Object.assign({ id: node.id.toString() }, node, initialState) as GraphNode
}
export function parseEdge(edge: Edge, defaults: Partial<GraphEdge> = {}): GraphEdge {