ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix empty search
Chocobozzz916bf5283b90
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.tsindex 250062e0ca..7425b70166 100644--- a/client/src/app/+search/search.component.ts+++ b/client/src/app/+search/search.component.ts@@ -1,4 +1,4 @@-import { forkJoin, of, Subscription } from 'rxjs'+import { forkJoin, Subscription } from 'rxjs'import { LinkType } from 'src/types/link.type'import { Component, OnDestroy, OnInit } from '@angular/core'import { ActivatedRoute, Router } from '@angular/router'@@ -19,7 +19,7 @@ import { HTMLServerConfig, SearchTargetType } from '@shared/models'export class SearchComponent implements OnInit, OnDestroy {error: string- results: (Video | VideoChannel)[] = []+ results: (Video | VideoChannel | VideoPlaylist)[] = []pagination = {currentPage: 1,@@ -283,8 +283,6 @@ export class SearchComponent implements OnInit, OnDestroy {}private getVideoChannelObs () {- if (!this.currentSearch) return of({ data: [], total: 0 })-const params = {search: this.currentSearch,componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.channelsPerPage }),@@ -301,8 +299,6 @@ export class SearchComponent implements OnInit, OnDestroy {}private getVideoPlaylistObs () {- if (!this.currentSearch) return of({ data: [], total: 0 })-const params = {search: this.currentSearch,componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.playlistsPerPage }),diff --git a/client/src/app/shared/shared-search/search.service.ts b/client/src/app/shared/shared-search/search.service.tsindex 2c26eb2e55..a1603da983 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()