PathFinding.js
PathFinding.js copied to clipboard
Restart Search leaves garbage
Sometimes "Restart Search" leaves garbage. See attached image:

The blue node on the left, and the green one on the right are garbage. After pressing "Cancel Search" I get this:

It seems to leave at most one garbage node at a time, but these can be accumulated.
Thanks for the report. Could you please tell me what browser are you using and if there's a way to reproduce the bug?
I am using Opera. I can reproduce it by pressing "Restart Search" multiple times. Sometimes it leaves these garbage nodes.
The simplest way to reproduce it is to clear all walls, select breadth-first search, then spam "Restart Search".

Confirmed. I'll try to locate and fix the bug.