Skip to content

Commit

Permalink
Bugfix JS: Permalink - lizMap.mainLizmap is undefined
Browse files Browse the repository at this point in the history
Fixed
```
Uncaught TypeError: lizMap.mainLizmap is undefined
    _writeURLFragment Permalink.js:216
```
  • Loading branch information
rldhont committed Dec 1, 2023
1 parent 05e66cd commit 72cf592
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/src/modules/Permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 72cf592

Please sign in to comment.