fix: do not try to backup an undefined geojson (#2468)

This occurs when a remote data returns an invalid geojson.
This commit is contained in:
Yohan Boniface 2025-01-31 17:18:43 +01:00 committed by GitHub
commit 718cc919f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -283,8 +283,10 @@ export class DataLayer extends ServerStored {
}
backupData() {
if (this._geojson) {
this._geojson_bk = Utils.CopyJSON(this._geojson)
}
}
reindex() {
const features = Object.values(this._features)