diff --git a/public/app/features/canvas/runtime/scene.tsx b/public/app/features/canvas/runtime/scene.tsx index 5a80d311fa7..80bb5565d4f 100644 --- a/public/app/features/canvas/runtime/scene.tsx +++ b/public/app/features/canvas/runtime/scene.tsx @@ -643,8 +643,8 @@ export class Scene { render() { const canShowContextMenu = this.isPanelEditing || (!this.isPanelEditing && this.isEditingEnabled); - const canShowElementTooltip = - !this.isEditingEnabled && this.tooltip?.element && this.tooltip.element.data.links?.length > 0; + const isTooltipValid = (this.tooltip?.element?.data?.links?.length ?? 0) > 0; + const canShowElementTooltip = !this.isEditingEnabled && isTooltipValid; return (