mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
fix: do not try to backup an undefined geojson
This occurs when a remote data returns an invalid geojson. Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
3e9982c8cb
commit
e38e0f162c
1 changed files with 3 additions and 1 deletions
|
@ -282,8 +282,10 @@ export class DataLayer extends ServerStored {
|
||||||
}
|
}
|
||||||
|
|
||||||
backupData() {
|
backupData() {
|
||||||
|
if (this._geojson) {
|
||||||
this._geojson_bk = Utils.CopyJSON(this._geojson)
|
this._geojson_bk = Utils.CopyJSON(this._geojson)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reindex() {
|
reindex() {
|
||||||
const features = Object.values(this._features)
|
const features = Object.values(this._features)
|
||||||
|
|
Loading…
Reference in a new issue