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 46207741ff
commit 01408254c9

View file

@ -155,6 +155,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', {
@ -255,7 +256,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 () {