From 391c3a16d5673f84e0ec032e4ed92baf823d3eeb Mon Sep 17 00:00:00 2001 From: oatkiller Date: Mon, 30 Mar 2020 16:42:00 -0400 Subject: [PATCH] fix issue with adjacency node map being passed down --- .../embeddables/resolver/view/index.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/endpoint/public/embeddables/resolver/view/index.tsx b/x-pack/plugins/endpoint/public/embeddables/resolver/view/index.tsx index 3e4e1f5717cdea5..60ba3bcf62ef0f0 100644 --- a/x-pack/plugins/endpoint/public/embeddables/resolver/view/index.tsx +++ b/x-pack/plugins/endpoint/public/embeddables/resolver/view/index.tsx @@ -82,15 +82,22 @@ export const Resolver = styled( projectionMatrix={projectionMatrix} /> ))} - {Array.from(processNodePositions).map(([processEvent, position], index) => ( - - ))} + {[...processNodePositions].map(([processEvent, position], index) => { + const adjacentNodeMap = processToAdjacencyMap.get(processEvent); + if (!adjacentNodeMap) { + // This should never happen + throw new Error('Issue calculating adjacency node map.'); + } + return ( + + ); + })} )}