diff --git a/umap/static/umap/js/modules/data/layer.js b/umap/static/umap/js/modules/data/layer.js index a742755b..febef6dc 100644 --- a/umap/static/umap/js/modules/data/layer.js +++ b/umap/static/umap/js/modules/data/layer.js @@ -528,8 +528,9 @@ export class DataLayer { .parse(raw, format) .then((geojson) => { this.sync.startBatch() - this.addData(geojson) + const data = this.addData(geojson) this.sync.commitBatch() + return data }) .catch((error) => { console.debug(error)