The code is the villain
Sooo I spent most of yesterday and this morning cursing because of this little buggy guy:
var indx = openList.indexOf(currentNode);
openList.splice(currentNode,1); <- see what I didn’t see?
And in the meantime I saw that a lot of people was having the same idea as mine so I’ll start from scratch ๐