From 05147feb2e2748ff0bdc465e33e652331281d44f 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 18212ce9..db4419ca 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -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 () {