mpetazzoni/leaflet-gpx — pull request #8 by rkusa (2013-07-27 14:14:03+00:00)
Title: Improve Empty TrackSegment Tolerance

I had problems with some GPX-Files. The problem was that `this._parse_trkseg` returned an empty array, which is because it checks `if (!el.length) return [];` (line 258). Leaflet itself throws an error for the following `L.Marker(coords[0]` calls. That is, this loop should stop there and continue if we get an empty array from `this._parse_trkseg`.