I think there is a bug in the RemoveNodeData function…
I’ll try to do this:
-Delete all nodes with key != 0 (there is only a node with this key)
But i need to cicle two times the node array because on the first cicle the last node (not with key == 0) isn’t deleted.
This is not a bug in GoJS, but a bug in your code.
Model.removeNodeData modifies the Model.nodeDataArray.
So your iteration through the Array is modifying the Array while you are iterating. You should not do that – copy the Array first and call forEach on the copied Array, or gather the elements to be deleted for deletion after forEach is done, or iterate without using forEach.