We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3070258 commit 201678bCopy full SHA for 201678b
src/store/weatherStore.js
@@ -19,6 +19,9 @@ export default {
19
state.items = payload;
20
state.searchLoading = false;
21
},
22
+ UNSET_ITEM_CITY(state) {
23
+ state.items = [];
24
+ },
25
UNSET_CITY(state, payload) {
26
state.cities = payload;
27
@@ -130,6 +133,7 @@ export default {
130
133
131
134
SEARCH_CITY({ commit }, payload) {
132
135
commit("SET_SEARCHLOADING", true);
136
+ commit("UNSET_ITEM_CITY");
137
let url = `https://dataservice.accuweather.com/locations/v1/cities/autocomplete?apikey=${
138
key.weather
139
}&q=${payload.searchText}&language=ru-ru`;
0 commit comments