Skip to content

Commit

Permalink
fix: undefined tooltip element (antvis#5835)
Browse files Browse the repository at this point in the history
  • Loading branch information
thejasonxie committed Nov 23, 2023
1 parent 31bd0d0 commit d4a0824
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 d4a0824

Please sign in to comment.