From 37e97e84e282aad93dd02fd82f65af71baf9cc05 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Mon, 25 May 2020 16:55:21 +0200 Subject: [PATCH] Bugs --- src/renderer/components/EditLayer.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 1bb27ee..4e72a93 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -239,6 +239,9 @@ }); }, show (index) { + if(Number.isNaN(index)) { + return; + } if(this.featureLookup===undefined || this.featureLookup[index]===undefined) { console.error("Lookup " + index + " failed "); this.buildLookup() @@ -334,7 +337,7 @@ latlng.lng = element._latlng.lng; return latlng; } - }); + }).filter(n => n); }, setPointCoords (index, coordinates) { var latlng = {lat: coordinates.latitude, lng: coordinates.longitude }; @@ -610,7 +613,7 @@ } } else if (element instanceof L.Polyline) { element._latlngs.forEach(element => { - if(!element.__vertex && Number(element.__vertex.glueindex) === Number(nIndex)){ + if(element.__vertex && Number(element.__vertex.glueindex) === Number(nIndex)){ latlng = element.__vertex.latlng; } });