Skip to content

Commit

Permalink
fix: undefined tooltip element (#5835) (#5836)
Browse files Browse the repository at this point in the history
  • Loading branch information
thejasonxie authored Nov 24, 2023
1 parent 31bd0d0 commit 52a5955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chart/controller/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export default class Tooltip extends Controller<TooltipOption> {
if (record) {
const elementId = geometry.getElementId(record);
const element = geometry.elementsMap[elementId];
if (geometry.type === 'heatmap' || element.visible) {
if (geometry.type === 'heatmap' || (element && element.visible)) {
// Heatmap 没有 Element
// 如果图形元素隐藏了,怎不再 tooltip 上展示相关数据
const items = getTooltipItems(record, geometry, title);
Expand Down

0 comments on commit 52a5955

Please sign in to comment.