From 72cf59238136072f85cc3402c9d6f09caf29eb14 Mon Sep 17 00:00:00 2001 From: rldhont Date: Fri, 1 Dec 2023 11:57:57 +0100 Subject: [PATCH] Bugfix JS: Permalink - lizMap.mainLizmap is undefined Fixed ``` Uncaught TypeError: lizMap.mainLizmap is undefined _writeURLFragment Permalink.js:216 ``` --- assets/src/modules/Permalink.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/src/modules/Permalink.js b/assets/src/modules/Permalink.js index c8734cc523..70eaae1a8a 100644 --- a/assets/src/modules/Permalink.js +++ b/assets/src/modules/Permalink.js @@ -42,7 +42,7 @@ export default class Permalink { }); } - document.querySelectorAll('#input-embed-width-permalink, #input-embed-height-permalink').forEach(input => + document.querySelectorAll('#input-embed-width-permalink, #input-embed-height-permalink').forEach(input => input.addEventListener('input', this._refreshURLsInPermalinkComponent) ); @@ -213,7 +213,7 @@ export default class Permalink { let itemsStyle = []; let itemsOpacity = []; - for (const item of lizMap.mainLizmap.state.rootMapGroup.findMapLayersAndGroups()) { + for (const item of mainLizmap.state.rootMapGroup.findMapLayersAndGroups()) { if (item.checked){ itemsVisibility.push(encodeURIComponent(item.name)); itemsStyle.push(item.wmsSelectedStyleName);