comparison client/src/application/Morphtool.vue @ 906:dd81ebefc50d

morphtool refactored if clause
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 02 Oct 2018 16:52:58 +0200
parents 62a30a78ac2f
children 21ab63347a6c
comparison
equal deleted inserted replaced
903:2990a878b16b 906:dd81ebefc50d
96 ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]), 96 ...mapState("mapstore", ["identifiedFeatures", "selectedMorph"]),
97 selectedBottleneck: function() { 97 selectedBottleneck: function() {
98 if (this.identifiedFeatures) { 98 if (this.identifiedFeatures) {
99 for (let feature of this.identifiedFeatures) { 99 for (let feature of this.identifiedFeatures) {
100 let id = feature.getId(); 100 let id = feature.getId();
101 if (id && id.replace(/[.][^.]*$/, "") === "bottlenecks") { 101 if (/bottlenecks/.test(id)) {
102 this.$store.commit("mapstore/setSelectedMorph", null); 102 this.$store.commit("mapstore/setSelectedMorph", null);
103 return feature; 103 return feature;
104 } 104 }
105 } 105 }
106 } 106 }