Delete old options after consuming them

This commit is contained in:
Yohan Boniface 2023-09-01 11:52:38 +02:00
parent f57ef51bf6
commit 1b60b46a3f

View file

@ -253,9 +253,11 @@ L.U.DataLayer = L.Evented.extend({
// Retrocompat // Retrocompat
if (this.options.remoteData && this.options.remoteData.from) { if (this.options.remoteData && this.options.remoteData.from) {
this.options.fromZoom = this.options.remoteData.from this.options.fromZoom = this.options.remoteData.from
delete this.options.remoteData.from
} }
if (this.options.remoteData && this.options.remoteData.to) { if (this.options.remoteData && this.options.remoteData.to) {
this.options.toZoom = this.options.remoteData.to this.options.toZoom = this.options.remoteData.to
delete this.options.remoteData.to
} }
this.backupOptions() this.backupOptions()
this.connectToMap() this.connectToMap()