mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Merge pull request #3420 from grittypuffy/fix-search
fix: Infinite loading when search query is empty
This commit is contained in:
commit
1059a5967b
2 changed files with 9 additions and 5 deletions
|
@ -113,7 +113,7 @@ pnpm install
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
|
|
||||||
```
|
```
|
||||||
pnpm serve
|
pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now make changes and view then in realtime!
|
You can now make changes and view then in realtime!
|
||||||
|
|
|
@ -200,10 +200,14 @@ export default {
|
||||||
},
|
},
|
||||||
submitSearch(e) {
|
submitSearch(e) {
|
||||||
e.target.blur();
|
e.target.blur();
|
||||||
|
if (this.searchText) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "SearchResults",
|
name: "SearchResults",
|
||||||
query: { search_query: this.searchText },
|
query: { search_query: this.searchText },
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$router.push("/");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue