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).
This commit is contained in:
Alexis Métaireau 2024-05-31 14:41:21 +02:00
parent d91c86e7fa
commit d3730a99ff

View file

@ -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())
}