From 129570100d9be6563ceab3daae61c14e4bb31097 Mon Sep 17 00:00:00 2001 From: Elena Martynova Date: Tue, 21 Feb 2023 16:09:53 +0300 Subject: [PATCH] fix: fix check if chart exists before adjust font size --- src/plugins/highcharts/renderer/helpers/config/config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/highcharts/renderer/helpers/config/config.js b/src/plugins/highcharts/renderer/helpers/config/config.js index cd5e6d40..773246d7 100644 --- a/src/plugins/highcharts/renderer/helpers/config/config.js +++ b/src/plugins/highcharts/renderer/helpers/config/config.js @@ -6,6 +6,7 @@ import merge from 'lodash/merge'; import mergeWith from 'lodash/mergeWith'; import get from 'lodash/get'; import clamp from 'lodash/clamp'; +import isEmpty from 'lodash/isEmpty'; import isNumber from 'lodash/isNumber'; import throttle from 'lodash/throttle'; import pick from 'lodash/pick'; @@ -1424,7 +1425,7 @@ function fixTooltipOnClick(event, {options}) { } function adjustDonutFontSize(chart, chartSeries, innerWidth, totals) { - if (!totals || !chart || !chartSeries) { + if (!totals || isEmpty(chart) || isEmpty(chartSeries)) { return; } const MIN_ACCEPTABLE_INNER_SIZE = 400;