Don't error out just because we don't have a main map.
This commit is contained in:
parent
31947c848a
commit
16499fe23e
1 changed files with 5 additions and 3 deletions
|
|
@ -10,9 +10,11 @@
|
|||
<script>
|
||||
function onLoad() {
|
||||
const map = document.querySelector("map-aggregate");
|
||||
map.addEventListener("cell-click", (event) => {
|
||||
window.location.href = "/cell/" + event.detail.cell;
|
||||
});
|
||||
if (map) {
|
||||
map.addEventListener("cell-click", (event) => {
|
||||
window.location.href = "/cell/" + event.detail.cell;
|
||||
});
|
||||
}
|
||||
}
|
||||
window.addEventListener("load", onLoad);
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue