bgrins / javascript-astar

A* Search / Pathfinding Algorithm in Javascript
https://briangrinstead.com/blog/astar-search-algorithm-in-javascript-updated/
MIT License
1.36k stars 324 forks source link

Getting error in browser #56

Open marisusis opened 7 years ago

marisusis commented 7 years ago

astar.js:163 Uncaught TypeError: Cannot read property 'length' of undefined at new Graph (astar.js:163) at :7:13

dzole0311 commented 5 years ago

astar.js:163 Uncaught TypeError: Cannot read property 'length' of undefined at new Graph (astar.js:163) at :7:13

Can you give more details about how to reproduce this issue?

seamuskills commented 3 years ago

I think i have the same problem. basically I reference p[0] where p is the result of astar.search(pfGrid,start,end) referencing p[0].x gives the error.