Closed Jcbobo closed 5 years ago
in the last PR the ancestors array is build each time from scratch so it should not be happen anymore to have multiple time the same id in the ancestors array,
do you think that validation should be inserted for avoid calling moveNode method passing the same node as parent and node?
moving a node to itself is allowed (it should?) but when done multiple time the ancestors is updated adding each time the reference to the note itself
{ "name": "node1", "id": "58ca67bac8e08111d6e3224f", "ancestors": [ "58ca67e1c8e08111d6e32250", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f", "58ca67bac8e08111d6e3224f" ], "parent": "58ca67bac8e08111d6e3224f" }