Workaround an unhandled error when changing card configuration
This commit is contained in:
parent
8363d0775c
commit
a470fe38fd
|
@ -254,6 +254,13 @@ class GraphView extends GraphViewBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX WORKAROUND: this can be called from `requestAnimationFrame` callback after the edge has already been removed.
|
||||||
|
// Might be a react-digraph bug.
|
||||||
|
const edgeKey = [ edge.source, edge.target ].join('_');
|
||||||
|
if (edge.source && edge.target && !this.state.edgesMap[edgeKey]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const idVar = edge.target ? `${edge.source}-${edge.target}` : 'custom';
|
const idVar = edge.target ? `${edge.source}-${edge.target}` : 'custom';
|
||||||
const id = `edge-${idVar}`;
|
const id = `edge-${idVar}`;
|
||||||
const element = this.getEdgeComponent(edge, nodeMoving);
|
const element = this.getEdgeComponent(edge, nodeMoving);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user