From b7009e3ed0d783ba6597c67dbaa93e8c9d01613d Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 16 Sep 2021 12:39:17 +0200 Subject: [PATCH] Init empty permissions Fix bug where we coud not edit permissions of a new saved map unless reloading the page. --- umap/static/umap/js/umap.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index d5f55c52..944f55cc 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -45,7 +45,8 @@ L.Map.mergeOptions({ captionBar: false, slideshow: {}, clickable: true, - easing: true + easing: true, + permissions: {} }); L.U.Map.include({ @@ -196,7 +197,7 @@ L.U.Map.include({ this.help = new L.U.Help(this); this.slideshow = new L.U.Slideshow(this, this.options.slideshow); - this.permissions = new L.U.MapPermissions(this, this.options.permissions); + this.permissions = new L.U.MapPermissions(this); this.initCaptionBar(); if (this.options.allowEdit) { this.editTools = new L.U.Editable(this);