Bug with lookup

This commit is contained in:
portree_kid 2020-05-13 19:34:03 +02:00
parent 079a56abfd
commit de0267ac7d

View File

@ -490,13 +490,13 @@
}) })
}, },
editedParkings() { editedParkings() {
if(this.featureLookup===undefined || this.featureLookup[index]===undefined) { if(this.featureLookup===undefined) {
console.error("Lookup " + index + " failed "); console.warn("Lookup undefinded");
this.buildLookup() this.buildLookup()
} }
console.log('Edited Parkings : ' + this.$store.state.Parkings.items) console.log('Edited Parkings : ' + this.$store.state.Parkings.items)
this.$store.state.Parkings.items.forEach( newElement => { this.$store.state.Parkings.items.forEach( newElement => {
console.log(newElement); console.debug(newElement);
this.featureLookup[newElement.index].forEach((element,index) => { this.featureLookup[newElement.index].forEach((element,index) => {
if (element instanceof L.ParkingSpot) { if (element instanceof L.ParkingSpot) {
element.options.attributes.name = newElement.name element.options.attributes.name = newElement.name