Add null check before tip.hide() on mouseout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 08:44:42 +08:00
parent 5058400d72
commit c602848ad7

View File

@@ -281,7 +281,7 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
if (node.data("label").length > 10) tip.show(); if (node.data("label").length > 10) tip.show();
}); });
cy.on('mouseout', 'node', function (event) { cy.on('mouseout', 'node', function (event) {
tip.hide(); tip?.hide();
}); });
// here we remember and recall positions // here we remember and recall positions