Fix variable declared globally by mistake

This can have an impact in map listing, because dataToload will
be shared.
This commit is contained in:
Yohan Boniface 2023-10-27 10:10:29 +02:00
parent 9eea9f942d
commit 41ec18a08d

View file

@ -397,7 +397,11 @@ L.U.Map.include({
loadDatalayers: function (force) { loadDatalayers: function (force) {
force = force || L.Util.queryString('download') // In case we are in download mode, let's go strait to loading all data 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 let datalayer
const loaded = () => { const loaded = () => {
this.datalayersLoaded = true this.datalayersLoaded = true