diff --git a/README.md b/README.md index 7e8e988b..19fe7635 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ pnpm install ### Compiles and hot-reloads for development ``` -pnpm serve +pnpm dev ``` You can now make changes and view then in realtime! 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; }, },