From 9bc3f8c7a62d3b269626be87a46de1d8a6949f57 Mon Sep 17 00:00:00 2001 From: "Mr.Dr.Professor Patrick" Date: Mon, 21 Nov 2022 22:41:17 +0600 Subject: [PATCH] fix(Highcharts plugin): fix tooltip holidays handling (#69) fix(Highcharts plugin): fix tooltip golidays handling --- src/plugins/highcharts/renderer/helpers/config/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/highcharts/renderer/helpers/config/config.js b/src/plugins/highcharts/renderer/helpers/config/config.js index 753b3213..ec2cd824 100644 --- a/src/plugins/highcharts/renderer/helpers/config/config.js +++ b/src/plugins/highcharts/renderer/helpers/config/config.js @@ -630,10 +630,10 @@ function getTooltip(tooltip, options, comments, holidays) { if (region !== 'tot') { json.region = region; } - if (holidays.holiday[region][pointTimestamp]) { + if (holidays?.holiday[region][pointTimestamp]) { json.holiday = true; json.holidayText = holidays.holiday[region][pointTimestamp]; - } else if (holidays.weekend[region][pointTimestamp]) { + } else if (holidays?.weekend[region][pointTimestamp]) { json.weekend = true; }