Use includes instead of indexOf

This commit is contained in:
Maximilian Krög
2022-08-05 00:36:16 +02:00
parent 5e34b9aa20
commit 0b945f2321
26 changed files with 50 additions and 57 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ class MVT extends FeatureFormat {
const pbfLayers = pbf.readFields(layersPBFReader, {});
const features = [];
for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) {
if (layers && !layers.includes(name)) {
continue;
}
const pbfLayer = pbfLayers[name];