fix(sync): intialize the sync engine before entering edit mode.

Otherwise `this.sync` is not defined.
This commit is contained in:
Alexis Métaireau 2024-05-09 23:35:09 +02:00
parent 1f0782665b
commit cbdcfba720
No known key found for this signature in database
GPG key ID: 1C21B876828E5FF2

View file

@ -153,6 +153,7 @@ U.Map = L.Map.extend({
this.options.onLoadPanel = 'datafilters'
}
this.sync = new U.SyncEngine(this)
let isDirty = false // self status
try {
Object.defineProperty(this, 'isDirty', {
@ -251,7 +252,6 @@ U.Map = L.Map.extend({
this.backup()
this.initContextMenu()
this.on('click contextmenu.show', this.closeInplaceToolbar)
this.sync = new U.SyncEngine(this)
},
initSyncEngine: async function () {