bug when adding tasks

Hello,

There seems to be a bug when adding tasks at a certain index.

When you have a branch with 4 items and you add a task through the api(gantt.addTask())

and you supply a index, then it always gets added to the back of the branch instead of on the right index.

gantt.addTask({ id: response.id, text: "", start_date: response.start_date, duration: 1, index: gantt.getTaskIndex(selectedTaskId) }, parentId);

the data that i’m providing to the method is correct

index should be

index: gantt.getTaskIndex(selectedTaskId) + 1

something went wrong while pasting i guess