From 051b7b22def39dd3f66083362a9cd7833a227a46 Mon Sep 17 00:00:00 2001 From: grittypuffy Date: Fri, 23 Feb 2024 12:38:47 +0530 Subject: [PATCH 1/2] Fix: Infinite loading due to empty string in search query --- src/components/NavBar.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; }, }, From 71966aaf4f1db7828b3322e40d4688c5a5c9b102 Mon Sep 17 00:00:00 2001 From: grittypuffy Date: Fri, 23 Feb 2024 12:40:08 +0530 Subject: [PATCH 2/2] Update: pnpm serve to pnpm dev --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!