From: Evert Timberg Date: Wed, 27 May 2020 00:03:18 +0000 (-0400) Subject: Only draw the tooltip if it is defined (#7411) X-Git-Tag: v3.0.0-beta.2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e590a9792c78d2a9e8ab14abf39507ad0dfd755b;p=thirdparty%2FChart.js.git Only draw the tooltip if it is defined (#7411) --- diff --git a/src/plugins/plugin.tooltip.js b/src/plugins/plugin.tooltip.js index f4825a93b..559f93b4a 100644 --- a/src/plugins/plugin.tooltip.js +++ b/src/plugins/plugin.tooltip.js @@ -1076,6 +1076,7 @@ export default { afterDraw(chart) { const tooltip = chart.tooltip; + const args = { tooltip }; @@ -1084,7 +1085,9 @@ export default { return; } - tooltip.draw(chart.ctx); + if (tooltip) { + tooltip.draw(chart.ctx); + } plugins.notify(chart, 'afterTooltipDraw', [args]); },