From 797a29c0abdfea166fc144616c4db9d17142e513 Mon Sep 17 00:00:00 2001 From: oatkiller Date: Mon, 30 Mar 2020 17:03:02 -0400 Subject: [PATCH] remove object allocations --- .../resolver/view/process_event_dot.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/endpoint/public/embeddables/resolver/view/process_event_dot.tsx b/x-pack/plugins/endpoint/public/embeddables/resolver/view/process_event_dot.tsx index ec585f446f18b..f30e5bb0f3578 100644 --- a/x-pack/plugins/endpoint/public/embeddables/resolver/view/process_event_dot.tsx +++ b/x-pack/plugins/endpoint/public/embeddables/resolver/view/process_event_dot.tsx @@ -117,18 +117,6 @@ export const ProcessEventDot = styled( const labelYHeight = markerSize / 1.7647; - const levelAttribute = adjacentNodeMap?.level - ? { - 'aria-level': adjacentNodeMap.level, - } - : {}; - - const flowToAttribute = adjacentNodeMap?.nextSibling - ? { - 'aria-flowto': adjacentNodeMap.nextSibling, - } - : {}; - /** * An element that should be animated when the node is clicked. */ @@ -175,8 +163,8 @@ export const ProcessEventDot = styled( viewBox="-15 -15 90 30" preserveAspectRatio="xMidYMid meet" role="treeitem" - {...levelAttribute} - {...flowToAttribute} + aria-level={adjacentNodeMap.level} + aria-flowto={adjacentNodeMap.nextSibling} aria-labelledby={labelId} aria-describedby={descriptionId} aria-haspopup={'true'}