prevent sending search GET parameter if undefined in my watch history

This commit is contained in:
Rigel Kent 2021-01-13 16:07:26 +01:00
parent 5188db66c7
commit 4b4635bdb1
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ export class UserHistoryService {
let params = new HttpParams()
params = this.restService.addRestGetParams(params, pagination)
params = params.append('search', search)
if (search) params = params.append('search', search)
return this.authHttp
.get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params })