Browse Source

Fixing undefined location in mapForm when not allowing location.

master
GabrielTrettel 3 years ago
parent
commit
77959fd0db
  1. 4
      src/app/components/map/OpenStreetMap.js

4
src/app/components/map/OpenStreetMap.js

@ -49,7 +49,9 @@ export default function OpenStreetMap({
const [mapRef, setMapRef] = useState(null);
const webviewContent = html_content;
const [markerListener, setMarkerListener] = useState(null);
const viewFunction = setViewCode(global.location.lat, global.location.long, global.location.zoom);
const _location = global.location || global.defaultLocation
const viewFunction = setViewCode(_location.lat, _location.long, _location.zoom);
const markersList = MapMarkerList({
markers: markers,

Loading…
Cancel
Save