aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header/header.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 11:55:51 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:54 +0200
commitdb400f447a9f7aae1c56fa25396e93069744483f (patch)
treef45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/header/header.component.ts
parent54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff)
downloadPeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.gz
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.zst
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.zip
Upgrade to rxjs 6
Diffstat (limited to 'client/src/app/header/header.component.ts')
-rw-r--r--client/src/app/header/header.component.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts
index 42de2dd92..9d2a83773 100644
--- a/client/src/app/header/header.component.ts
+++ b/client/src/app/header/header.component.ts
@@ -1,5 +1,6 @@
1import { filter, map } from 'rxjs/operators'
1import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
2import { Router, NavigationEnd } from '@angular/router' 3import { NavigationEnd, Router } from '@angular/router'
3import { getParameterByName } from '../shared/misc/utils' 4import { getParameterByName } from '../shared/misc/utils'
4 5
5@Component({ 6@Component({
@@ -15,9 +16,11 @@ export class HeaderComponent implements OnInit {
15 16
16 ngOnInit () { 17 ngOnInit () {
17 this.router.events 18 this.router.events
18 .filter(e => e instanceof NavigationEnd) 19 .pipe(
19 .map(() => getParameterByName('search', window.location.href)) 20 filter(e => e instanceof NavigationEnd),
20 .filter(searchQuery => !!searchQuery) 21 map(() => getParameterByName('search', window.location.href)),
22 filter(searchQuery => !!searchQuery)
23 )
21 .subscribe(searchQuery => this.searchValue = searchQuery) 24 .subscribe(searchQuery => this.searchValue = searchQuery)
22 } 25 }
23 26