CloudMade/Leaflet — pull request #549 by mehmeta (2012-02-29 22:36:58+00:00)
Title: Fixed bugs on polyline editing regarding edge cases

This commit fixes couple bugs. One of them is polylines (or polygons)
can be reduced to a single point by clicking on markers to remove
them. Second, if an edge point is clicked for a polyline (not
applicable to polygons since they are a circular linked list) code
produces a js error since previous or next might not be present.