diff --git a/web/src/api/auth.js b/web/src/api/auth.js index 9031b0c5..2c15abb6 100644 --- a/web/src/api/auth.js +++ b/web/src/api/auth.js @@ -61,5 +61,5 @@ export const logout = async () => { currentUser.value = undefined; currentProject.value = undefined; clearState(); - setMapCenter(undefined); + setMapCenter(); }; diff --git a/web/src/components/map/Map.vue b/web/src/components/map/Map.vue index bf6bf233..b6069f3c 100644 --- a/web/src/components/map/Map.vue +++ b/web/src/components/map/Map.vue @@ -152,7 +152,7 @@ export default { onMounted(() => { createMap(); - setMapCenter(undefined); + setMapCenter(); }); return { diff --git a/web/src/storeFunctions.ts b/web/src/storeFunctions.ts index cca9df5c..087c0cc0 100644 --- a/web/src/storeFunctions.ts +++ b/web/src/storeFunctions.ts @@ -87,7 +87,7 @@ export function loadProjects() { }); } -export function setMapCenter(project: Project | undefined) { +export function setMapCenter(project: Project | undefined = undefined) { let center: [number, number] = [0, 30]; let zoom = 1; if (project) {