From 5ae87a039b28e5fd8ae8d3243bd32b6d96a34267 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Mon, 11 Apr 2016 11:41:39 +0200 Subject: [PATCH] Make cached edge processing more robust --- client/app/scripts/charts/nodes-layout.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/app/scripts/charts/nodes-layout.js b/client/app/scripts/charts/nodes-layout.js index c54c65bbe3..2cd1c83ee8 100644 --- a/client/app/scripts/charts/nodes-layout.js +++ b/client/app/scripts/charts/nodes-layout.js @@ -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'));