mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Make cached edge processing more robust
This commit is contained in:
@@ -297,7 +297,8 @@ function hasSameEndpoints(cachedEdge, nodes) {
|
||||
const oldTargetPoint = oldPoints.last();
|
||||
const newSource = nodes.get(cachedEdge.get('source'));
|
||||
const newTarget = nodes.get(cachedEdge.get('target'));
|
||||
return (oldSourcePoint.get('x') === newSource.get('x')
|
||||
return (oldSourcePoint && oldTargetPoint && newSource && newTarget
|
||||
&& oldSourcePoint.get('x') === newSource.get('x')
|
||||
&& oldSourcePoint.get('y') === newSource.get('y')
|
||||
&& oldTargetPoint.get('x') === newTarget.get('x')
|
||||
&& oldTargetPoint.get('y') === newTarget.get('y'));
|
||||
|
||||
Reference in New Issue
Block a user