From 9796304a9a16ff5346122478a298a6bc894d6136 Mon Sep 17 00:00:00 2001 From: Laurent Gay Date: Thu, 21 Nov 2024 17:47:09 +0100 Subject: [PATCH] correct if no place find --- src/views/HomeView.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 2c585b5eb..31c216720 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -417,13 +417,17 @@ const userSettingsLocation = computed(() => { coords.value, placeName ); - return { - lat: coords.value?.latitude, - lon: coords.value?.longitude, - name: placeName, - picture: location?.pictureInfo, - isIPLocation: coords.value?.isIPLocation, - }; + if (placeName) { + return { + lat: coords.value?.latitude, + lon: coords.value?.longitude, + name: placeName, + picture: location?.pictureInfo, + isIPLocation: coords.value?.isIPLocation, + }; + } else { + return {}; + } }); const { result: currentUserLocationResult } = useQuery<{