Skip to content

Commit

Permalink
Fix for index == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 12, 2023
1 parent 2ce322a commit 0ab4f18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/format/ArcGISGeoJSON.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 0ab4f18

Please sign in to comment.