Use RegExp#test intead of String#match

This commit is contained in:
Maximilian Krög
2022-08-05 01:09:03 +02:00
parent 81c10fa609
commit 403b06b438
4 changed files with 6 additions and 9 deletions

View File

@@ -321,10 +321,7 @@ const modify = new Modify({
.getFeatures()
.getArray()
.every(function (feature) {
return feature
.getGeometry()
.getType()
.match(/Polygon/);
return /Polygon/.test(feature.getGeometry().getType());
});
},
});