Fix query args updating outside of the search page

This commit is contained in:
simon987 2022-03-05 20:42:13 -05:00
parent 9b81856353
commit eea5ce75f3
3 changed files with 11 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -241,6 +241,11 @@ export default new Vuex.Store({
}
},
async updateArgs({state}, router: VueRouter) {
if (router.currentRoute.path !== "/") {
return;
}
await router.push({
query: {
q: state.searchText.trim() ? state.searchText.trim().replace(/\s+/g, " ") : undefined,

File diff suppressed because one or more lines are too long