From f1f6311b35d226caaddd306486281b3bde784a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 12 Dec 2023 17:14:36 +0100 Subject: [PATCH] Fix for index == 0 --- src/format/ArcGISGeoJSON.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format/ArcGISGeoJSON.js b/src/format/ArcGISGeoJSON.js index 8d768b10c115..b782e2e3c14a 100644 --- a/src/format/ArcGISGeoJSON.js +++ b/src/format/ArcGISGeoJSON.js @@ -1,6 +1,6 @@ // The MIT License (MIT) // -// Copyright (c) 2019-2022 Camptocamp SA +// Copyright (c) 2019-2023 Camptocamp SA // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in @@ -97,7 +97,7 @@ class ArcGISGeoJSON extends olFormatGeoJSON { // @ts-ignore: Arcgis specific const layerName = feature[layerIdentifier]; // Exclude feature if its layer name is not set among the layers - if (this.layers_ && !this.layers_.indexOf(layerName)) { + if (this.layers_ && !this.layers_.includes(layerName)) { continue; } features.push(this.readFeatureFromObject(geoJSONFeatures[i], opt_options));