diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/search/search.component.ts | 4 |
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 @@ | |||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | 2 | import { ActivatedRoute, Router } from '@angular/router' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { forkJoin, Subscription } from 'rxjs' | 4 | import { forkJoin, of, Subscription } from 'rxjs' |
5 | import { SearchService } from '@app/search/search.service' | 5 | import { SearchService } from '@app/search/search.service' |
6 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 6 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
7 | import { I18n } from '@ngx-translate/i18n-polyfill' | 7 | import { 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 }) |