Merge pull request #1382 from umap-project/fix-global-variable

Fix variable declared globally by mistake
This commit is contained in:
Yohan Boniface 2023-10-27 16:12:44 +02:00 committed by GitHub
commit 60a0f14439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -397,7 +397,11 @@ L.U.Map.include({
loadDatalayers: function (force) {
force = force || L.Util.queryString('download') // In case we are in download mode, let's go strait to loading all data
let toload = (dataToload = total = this.datalayers_index.length)
const total = this.datalayers_index.length
// toload => datalayer metadata remaining to load (synchronous)
// dataToload => datalayer data remaining to load (asynchronous)
let toload = total,
dataToload = total
let datalayer
const loaded = () => {
this.datalayersLoaded = true