Don't error out just because we don't have a main map.

This commit is contained in:
Eli Ribble 2026-03-21 03:11:22 +00:00
parent 31947c848a
commit 16499fe23e
No known key found for this signature in database

View file

@ -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>