aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/search/search.component.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts
index b86b5083a..911d56843 100644
--- a/client/src/app/search/search.component.ts
+++ b/client/src/app/search/search.component.ts
@@ -51,15 +51,12 @@ export class SearchComponent implements OnInit, OnDestroy {
51 queryParams => { 51 queryParams => {
52 const querySearch = queryParams['search'] 52 const querySearch = queryParams['search']
53 53
54 // New empty search
55 if (this.currentSearch && !querySearch) return this.redirectService.redirectToHomepage()
56
57 // Search updated, reset filters 54 // Search updated, reset filters
58 if (this.currentSearch !== querySearch) { 55 if (this.currentSearch !== querySearch) {
59 this.resetPagination() 56 this.resetPagination()
60 this.advancedSearch.reset() 57 this.advancedSearch.reset()
61 58
62 this.currentSearch = querySearch 59 this.currentSearch = querySearch || undefined
63 this.updateTitle() 60 this.updateTitle()
64 } 61 }
65 62
@@ -154,7 +151,7 @@ export class SearchComponent implements OnInit, OnDestroy {
154 } 151 }
155 152
156 private updateUrlFromAdvancedSearch () { 153 private updateUrlFromAdvancedSearch () {
157 const search = (this.currentSearch && this.currentSearch !== '') ? this.currentSearch : undefined 154 const search = this.currentSearch || undefined
158 155
159 this.router.navigate([], { 156 this.router.navigate([], {
160 relativeTo: this.route, 157 relativeTo: this.route,