prevent sending search GET parameter if undefined in my watch history
This commit is contained in:
parent
5188db66c7
commit
4b4635bdb1
|
@ -23,7 +23,8 @@ export class UserHistoryService {
|
||||||
|
|
||||||
let params = new HttpParams()
|
let params = new HttpParams()
|
||||||
params = this.restService.addRestGetParams(params, pagination)
|
params = this.restService.addRestGetParams(params, pagination)
|
||||||
params = params.append('search', search)
|
|
||||||
|
if (search) params = params.append('search', search)
|
||||||
|
|
||||||
return this.authHttp
|
return this.authHttp
|
||||||
.get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params })
|
.get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params })
|
||||||
|
|
Loading…
Reference in New Issue