Uncaught TypeError: Cannot read property 'data' of undefined OnMouseEnter event on open-topology.js

asked 2014-11-17 22:07:18 -0800

esumit gravatar image

I have seen this error many times :

onMouseEnter : function(node, eventInfo, e) { // if node if (node.id != undefined) { one.topology.graph.canvas.getElement().style.cursor = 'move'; } else if (eventInfo.edge != undefined && eventInfo.edge.nodeTo.data["$type"] == "switch" && eventInfo.edge.nodeFrom.data["$type"] == "switch") { one.topology.graph.canvas.getElement().style.cursor = 'pointer'; } },

Browser presents : Uncaught TypeError: Cannot read property 'data' of undefined on code line eventInfo.edge.nodeTo.data["$type"] == "switch"

edit retag flag offensive close merge delete