From 5f89203333fd488fc9fb70c7f2b1427444641f65 Mon Sep 17 00:00:00 2001 From: JUDIT GRESKOVITS Date: Wed, 15 Feb 2017 11:28:47 +0000 Subject: [PATCH] Fix add service for topology --- ui/src/components/topology/graph-simulation.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ui/src/components/topology/graph-simulation.js b/ui/src/components/topology/graph-simulation.js index 0c1d0f6d..fbed429c 100644 --- a/ui/src/components/topology/graph-simulation.js +++ b/ui/src/components/topology/graph-simulation.js @@ -78,17 +78,9 @@ const updateSimulation = ( }; }); - const mappedLinks = nextLinks.map((nextLink, index) => { - const simLink = simLinks.reduce((acc, l, i) => { - return nextLink.source === l.source && nextLink.target === l.target ? - l : acc; - }, {}); - return simLink ? { - ...simLink - } : { - ...nextLink - }; - }); + const mappedLinks = nextLinks.map((nextLink, index) => ({ + ...nextLink + })); const { width,