mapbox / leaflet-omnivore

universal format parser for Leaflet & Mapbox.js
https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-gpx/
Other
651 stars 126 forks source link

Uncaught TypeError: Cannot read property 'line' of undefined #69

Closed jimmyangel closed 8 years ago

jimmyangel commented 8 years ago

Hi,

I am seeing this error with the attached GPX file. It is probably an invalid GPX file, but I would expect to get the 'error' callback instead of an exception.

Uncaught TypeError: Cannot read property 'line' of undefined - leaflet-omnivore.js:1019

To get around this for now I am setting up a global window.onerror handler, but that is not ideal.

Thank you

AAAgpsbabel_output.txt

tmcw commented 8 years ago

Thanks for the bug report! This is fixed with the upgrade of toGeoJSON, which brings in the upstream fix https://github.com/mapbox/togeojson/commit/bfec7246d0863cde5a180488d771776f9e292ced