File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff 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};
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments