aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/search/search.component.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/search/search.component.ts b/client/src/app/search/search.component.ts
index 202b97ab3..dfd8d8823 100644
--- a/client/src/app/search/search.component.ts
+++ b/client/src/app/search/search.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { AuthService, Notifier } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { forkJoin, Subscription } from 'rxjs' 4import { forkJoin, of, Subscription } from 'rxjs'
5import { SearchService } from '@app/search/search.service' 5import { SearchService } from '@app/search/search.service'
6import { ComponentPagination } from '@app/shared/rest/component-pagination.model' 6import { ComponentPagination } from '@app/shared/rest/component-pagination.model'
7import { I18n } from '@ngx-translate/i18n-polyfill' 7import { I18n } from '@ngx-translate/i18n-polyfill'
@@ -184,6 +184,8 @@ export class SearchComponent implements OnInit, OnDestroy {
184 } 184 }
185 185
186 private getVideoChannelObs () { 186 private getVideoChannelObs () {
187 if (!this.currentSearch) return of({ data: [], total: 0 })
188
187 const params = { 189 const params = {
188 search: this.currentSearch, 190 search: this.currentSearch,
189 componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.channelsPerPage }) 191 componentPagination: immutableAssign(this.pagination, { itemsPerPage: this.channelsPerPage })