Skip to content

Commit 907dbce

Browse files
committed
Merge branch 'main' into gh-pages
2 parents 89c5d0e + cc114b3 commit 907dbce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/components/LocationSearchbar.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const getWeatherBySearch = () => {
3131
name: "weather",
3232
params: {
3333
location: location.value
34+
},
35+
query: {
36+
searched: 'true',
3437
}
3538
});
3639
};
@@ -42,6 +45,9 @@ const getWeatherByLocation = (location: any) => {
4245
name: "weather",
4346
params: {
4447
location: location.name
48+
},
49+
query: {
50+
searched: 'true',
4551
}
4652
});
4753
};

src/views/WeatherView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function getRouteFromParams() {
2323
// into a string so that ts doesn't yell at me
2424
const location = route.params.location.toString();
2525
26-
if (!location) return;
26+
if (!location || route.query?.searched) return;
2727
2828
weatherStore.getWeatherByName(location);
2929
}

0 commit comments

Comments
 (0)