From cbdcfba720d7c0dd8bb2e7947890763e1958265b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Thu, 9 May 2024 23:35:09 +0200 Subject: [PATCH] fix(sync): intialize the sync engine before entering edit mode. Otherwise `this.sync` is not defined. --- umap/static/umap/js/umap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 8924a2f4..4de496a2 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -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 () {