The author stated in some other comment that due to a bug multiple paths between 2 points may exist. Neither this bug got fixed, nor did the description get updated to mention this bug.
This has now been specified.
It's not the most efficient way to kick out, but the stack isn't very big in JavaScript, so the recursive calls throw an exception fairly quickly.
Loading collection data...
The author stated in some other comment that due to a bug multiple paths between 2 points may exist. Neither this bug got fixed, nor did the description get updated to mention this bug.
This has now been specified.
It's not the most efficient way to kick out, but the stack isn't very big in JavaScript, so the recursive calls throw an exception fairly quickly.