From c6c2c2f51b5d4005541faa454c68993217437efc Mon Sep 17 00:00:00 2001 From: Spikatrix <12792882+Spikatrix@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:28:24 +0000 Subject: [PATCH] Fix sentry heatmap crash --- public/app/plugins/panel/heatmap/utils.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/app/plugins/panel/heatmap/utils.ts b/public/app/plugins/panel/heatmap/utils.ts index d5d09e238c186..ec74f786f8ce0 100644 --- a/public/app/plugins/panel/heatmap/utils.ts +++ b/public/app/plugins/panel/heatmap/utils.ts @@ -722,6 +722,15 @@ export function heatmapPathsDense(opts: PathbuilderOpts) { let cx = cxs[~~(i / yBinQty)]; let cy = cys[i % yBinQty]; + if ( + fills === undefined || + fills[i] === undefined || + fillPaths === undefined || + fillPaths[fills[i]] === undefined + ) { + continue; + } + let fillPath = fillPaths[fills[i]]; rect(fillPath, cx, cy, xSize, ySize);