From 4a7abae6ae7fc621f07e5b85e09980c2df28aec7 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Wed, 20 Oct 2021 15:36:04 +0100 Subject: [PATCH] Geomap: Avoid exceptions when missing data and values (heatmap and zoom settings) (#40664) (cherry picked from commit 43878ff05f29e306d26c4a781f6082d9fb09b23e) Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com> --- public/app/plugins/panel/geomap/editor/MapViewEditor.tsx | 8 ++++---- public/app/plugins/panel/geomap/layers/data/heatMap.tsx | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/public/app/plugins/panel/geomap/editor/MapViewEditor.tsx b/public/app/plugins/panel/geomap/editor/MapViewEditor.tsx index 121df8c21c9..b0058432e3a 100644 --- a/public/app/plugins/panel/geomap/editor/MapViewEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/MapViewEditor.tsx @@ -49,9 +49,9 @@ export const MapViewEditor: FC = { vectorLayer.getSource().removeFeature(feature); }); + if (!frame) { + return; + } // Get data points (latitude and longitude coordinates) const info = dataFrameToPoints(frame, matchers); if (info.warning) {