]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/search/search.component.ts
Add information in report modal
[github/Chocobozzz/PeerTube.git] / client / src / app / search / search.component.ts
index 911d5684371208d994cc42274901cae724fe2df1..3d17e6d96fdc8425f7171d516ddefb3b4876e483 100644 (file)
@@ -1,6 +1,6 @@
 import { Component, OnDestroy, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
-import { AuthService, RedirectService } from '@app/core'
+import { AuthService } from '@app/core'
 import { NotificationsService } from 'angular2-notifications'
 import { forkJoin, Subscription } from 'rxjs'
 import { SearchService } from '@app/search/search.service'
@@ -40,7 +40,6 @@ export class SearchComponent implements OnInit, OnDestroy {
     private route: ActivatedRoute,
     private router: Router,
     private metaService: MetaService,
-    private redirectService: RedirectService,
     private notificationsService: NotificationsService,
     private searchService: SearchService,
     private authService: AuthService
@@ -147,7 +146,8 @@ export class SearchComponent implements OnInit, OnDestroy {
   }
 
   private updateTitle () {
-    this.metaService.setTitle(this.i18n('Search') + ' ' + this.currentSearch)
+    const suffix = this.currentSearch ? ' ' + this.currentSearch : ''
+    this.metaService.setTitle(this.i18n('Search') + suffix)
   }
 
   private updateUrlFromAdvancedSearch () {