diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index df3fdaff..73f4f09f 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -200,10 +200,14 @@ export default { }, submitSearch(e) { e.target.blur(); - this.$router.push({ - name: "SearchResults", - query: { search_query: this.searchText }, - }); + if (this.searchText) { + this.$router.push({ + name: "SearchResults", + query: { search_query: this.searchText }, + }); + } else { + this.$router.push("/"); + } return; }, },