"in" operator doesn't work with content of array.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 7 Jan 2021 20:27:53 +0000 (21:27 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 7 Jan 2021 20:27:53 +0000 (21:27 +0100)
wrmap.js

index 3731ce8c5847ea193290605fe6b124badc5155da..1ef8a367d06444d0834a77b2d9a42f4567947a76 100644 (file)
--- a/wrmap.js
+++ b/wrmap.js
@@ -128,7 +128,7 @@ function init_wrmap(i, jq_map) {
                        'anfahrt': '#e1e100'
                };
                let color = feature.get('strokeColor') || line_color[feature.get('type')] || '#e7525b';
-               let width = (feature.get('type') in ['lift', 'anfahrt']) ? 3 : 6;
+               let width = (['lift', 'anfahrt'].indexOf(feature.get('type')) >= 0) ? 3 : 6;
                return new ol.style.Style({
                        stroke: new ol.style.Stroke({
                                color: color,