From 0d976e7a8da11282a600e5e9780f464dab70475c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 13:34:47 -0500 Subject: [PATCH] Clean console ReferenceError (#418) (#422) --- public/components/map_container/map_container.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/components/map_container/map_container.tsx b/public/components/map_container/map_container.tsx index 98c7bd6d..944fda8d 100644 --- a/public/components/map_container/map_container.tsx +++ b/public/components/map_container/map_container.tsx @@ -241,8 +241,10 @@ export const MapContainer = ({ (indexPattern) => indexPattern.id === selectedLayerConfig.source.indexPatternId ); if (!findIndexPattern) { - // @ts-ignore - const newIndexPattern = await indexPatterns.get(selectedLayerConfig.source.indexPatternId); + const newIndexPattern = await services.data.indexPatterns.get( + // @ts-ignore + selectedLayerConfig.source.indexPatternId + ); const cloneLayersIndexPatterns = [...layersIndexPatterns, newIndexPattern]; setLayersIndexPatterns(cloneLayersIndexPatterns); }