diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index 5b6051c0..9d5c73a1 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -64,7 +64,7 @@ export const Layer = ( { useMapEvents({ popupopen: (e) => { - const item = Object.entries(leafletRefs).find(r => r[1].popup == e.popup)?.[1].item; + const item = Object.entries(leafletRefs).find(r => r[1].popup == e.popup)?.[1].item; if (item?.layer?.name == name && window.location.pathname.split("/")[2] != item.id) { window.history.pushState({}, "", `/${name}/${item.id}`) let title = ""; diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx index 1d317385..3a5e0602 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx @@ -5,7 +5,7 @@ import { Item } from '../../../../types' export const PopupButton = ({url, parameterField, text, colorField, item} : {url: string, parameterField?: string, text: string, colorField?: string, item? : Item}) => { return ( - + ) }