fix(edges): Remove orphaned edges
# What's changed? * Remove source/targetNode properties from GraphEdge type, the source/target will be fetched with getters if necessary * Remove edges when they have no existing source or target nodes that can be found in the state * Add nodes to custom edge test
This commit is contained in:
@@ -46,6 +46,16 @@ describe('test store state', () => {
|
||||
|
||||
it('gets custom edge types', () => {
|
||||
store.setState({
|
||||
nodes: [
|
||||
{
|
||||
id: '1',
|
||||
position: { x: 0, y: 0 },
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
position: { x: 50, y: 50 },
|
||||
},
|
||||
],
|
||||
edges: [
|
||||
{
|
||||
id: '1',
|
||||
|
||||
Reference in New Issue
Block a user