From 916bf5283b90935c166966918d895cf6f55e24f7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Jul 2021 15:51:19 +0200 Subject: Fix empty search --- client/src/app/shared/shared-search/search.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-search') diff --git a/client/src/app/shared/shared-search/search.service.ts b/client/src/app/shared/shared-search/search.service.ts index 2c26eb2e5..a1603da98 100644 --- a/client/src/app/shared/shared-search/search.service.ts +++ b/client/src/app/shared/shared-search/search.service.ts @@ -79,7 +79,8 @@ export class SearchService { let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination) - params = params.append('search', search) + + if (search) params = params.append('search', search) if (advancedSearch) { const advancedSearchObject = advancedSearch.toChannelAPIObject() @@ -110,7 +111,8 @@ export class SearchService { let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination) - params = params.append('search', search) + + if (search) params = params.append('search', search) if (advancedSearch) { const advancedSearchObject = advancedSearch.toPlaylistAPIObject() -- cgit v1.2.3