dabeng / react-orgchart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
135 stars 112 forks source link

Uncaught TypeError: Cannot read property 'parentNode' of null #15

Open developer-akash opened 4 years ago

developer-akash commented 4 years ago

Hi @dabeng In React Orgchart When I'm moving the graph haphazardly or doing hover on that somehow return parent node getting undefined or null. So I have added an if condition in ChartNode.js file after that the functionality is working smoothly.

I have found a solution but for that, I have to change in the node module's ChartNode.js file. So, if you can update your package & release a new version then it will be very helpful for me

Filename: node_modules@dabeng\react-orgchart\dist\ChartNode.js in var addArrows = function. line number 140 add the line if (!node) return false;

Thanks in advance