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,7 +283,9 @@ export class DataLayer extends ServerStored {
} }
backupData() { backupData() {
this._geojson_bk = Utils.CopyJSON(this._geojson) if (this._geojson) {
this._geojson_bk = Utils.CopyJSON(this._geojson)
}
} }
reindex() { reindex() {