From 33e3aa2563af3e09f65fa6389c03f1b4540b9435 Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Mon, 28 Sep 2020 12:37:33 -0500 Subject: [PATCH] Fix APM lodash imports (#78438) Co-authored-by: Elastic Machine --- .../apm/public/components/app/ServiceMap/Cytoscape.tsx | 4 +--- .../components/app/ServiceMap/use_cytoscape_event_handlers.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/Cytoscape.tsx b/x-pack/plugins/apm/public/components/app/ServiceMap/Cytoscape.tsx index 5fa74f927d2de..d65ce1879ce02 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/Cytoscape.tsx +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/Cytoscape.tsx @@ -6,9 +6,7 @@ import cytoscape from 'cytoscape'; import dagre from 'cytoscape-dagre'; -// Prefer importing entire lodash library, e.g. import { get } from "lodash" -// eslint-disable-next-line no-restricted-imports -import isEqual from 'lodash/isEqual'; +import { isEqual } from 'lodash'; import React, { createContext, CSSProperties, diff --git a/x-pack/plugins/apm/public/components/app/ServiceMap/use_cytoscape_event_handlers.ts b/x-pack/plugins/apm/public/components/app/ServiceMap/use_cytoscape_event_handlers.ts index e77fc4dfb2f51..e8c6a3165ce93 100644 --- a/x-pack/plugins/apm/public/components/app/ServiceMap/use_cytoscape_event_handlers.ts +++ b/x-pack/plugins/apm/public/components/app/ServiceMap/use_cytoscape_event_handlers.ts @@ -5,9 +5,7 @@ */ import cytoscape from 'cytoscape'; -// Prefer importing entire lodash library, e.g. import { get } from "lodash" -// eslint-disable-next-line no-restricted-imports -import debounce from 'lodash/debounce'; +import { debounce } from 'lodash'; import { useEffect } from 'react'; import { EuiTheme, useUiTracker } from '../../../../../observability/public'; import { getAnimationOptions, getNodeHeight } from './cytoscapeOptions';