fix(core,nodes): use object assign to parse node
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -99,11 +99,7 @@ export function parseNode(node: Node, defaults: Partial<GraphNode> = {}): GraphN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return Object.assign({ id: node.id.toString() }, node, initialState) as GraphNode
|
||||||
...initialState,
|
|
||||||
...(node as GraphNode),
|
|
||||||
id: node.id.toString(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseEdge(edge: Edge, defaults: Partial<GraphEdge> = {}): GraphEdge {
|
export function parseEdge(edge: Edge, defaults: Partial<GraphEdge> = {}): GraphEdge {
|
||||||
|
|||||||
Reference in New Issue
Block a user