From 7fd1e559383807dd0b509c7a08642f9d3a48616e Mon Sep 17 00:00:00 2001 From: mmd-osm Date: Thu, 10 Aug 2017 19:49:50 +0100 Subject: [PATCH] Discard empty ways from query result geometries Fixes #1608 --- app/assets/javascripts/index/query.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 018aedf98..7ac613d71 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -146,7 +146,7 @@ OSM.Query = function(map) { if (feature.type === "node" && feature.lat && feature.lon) { geometry = L.circleMarker([feature.lat, feature.lon], featureStyle); - } else if (feature.type === "way" && feature.geometry) { + } else if (feature.type === "way" && feature.geometry && feature.geometry.length > 0) { geometry = L.polyline(feature.geometry.filter(function (point) { return point !== null; }).map(function (point) { -- 2.39.5