diff --git a/js/id/renderer/background.js b/js/id/renderer/background.js index 45a355369..1cf3c29bb 100644 --- a/js/id/renderer/background.js +++ b/js/id/renderer/background.js @@ -264,9 +264,11 @@ iD.Background = function(context) { var gpx = q.gpx; if (gpx) { d3.text(gpx, function(err, gpxTxt) { - gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt))); - iD.ui.MapInMap.gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt))); - dispatch.change(); + if (!err) { + gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt))); + iD.ui.MapInMap.gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt))); + dispatch.change(); + } }); } };