From d3730a99ff295d16b063d5b13e4e35729687c43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 31 May 2024 14:41:21 +0200 Subject: [PATCH] fix: use `array.includes(string)` the proper way. Because this `syncUpdatedProperties` function is only called once, it didn't trigger any issue in practice (as the check was always returning true). --- umap/static/umap/js/umap.features.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index fbe0af5c..e2c73d72 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -27,7 +27,7 @@ U.FeatureMixin = { syncUpdatedProperties: function (properties) { // When updating latlng, sync the whole geometry - if ('latlng'.includes(properties)) { + if (properties.includes('latlng')) { const { subject, metadata, engine } = this.getSyncMetadata() engine.update(subject, metadata, 'geometry', this.getGeometry()) }