diff --git a/src/app/components/MapSearch/index.tsx b/src/app/components/MapSearch/index.tsx index fc5f257..b10f88b 100644 --- a/src/app/components/MapSearch/index.tsx +++ b/src/app/components/MapSearch/index.tsx @@ -76,7 +76,7 @@ export const ValueRenderer = ({ time, value, unit }) => { export const MapSearch: React.FunctionComponent = props => { const { - value, + value = { latlng: { lat: 0, lng: 0 } }, setPoint, openCharts, className, @@ -206,42 +206,40 @@ export const MapSearch: React.FunctionComponent = props => { /> - {value?.latlng && ( - - - - - - context.map.flyTo( - [value.latlng.lat, value.latlng.lng], - context.map.getZoom(), - ) - } - > - - - - - - - ), - }} - aria-label={'Centra la mappa'} - > - )} + + + + + + context.map.flyTo( + [value.latlng.lat, value.latlng.lng], + context.map.getZoom(), + ) + } + > + + + + + + + ), + }} + aria-label={'Centra la mappa'} + > );