Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(build): update code to work with latest RxJS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuawilson committed Jun 28, 2018
1 parent b841125 commit 274c05d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/app/broadcaster.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { Observable } from 'rxjs/Observable';
import 'rxjs/operators/filter';
import 'rxjs/operators/map';
import { Observable, Subject } from 'rxjs';
import { filter, map } from 'rxjs/operators';

interface BroadcastEvent {
key: any;
Expand Down Expand Up @@ -70,7 +68,8 @@ export class Broadcaster {
*/
on<T>(key: any): Observable<T> {
return this._eventBus.asObservable()
.filter(event => event.key === key)
.map(event => <T> event.data);
.pipe(filter(event => event.key === key),
map(event => <T> event.data)
);
}
}

0 comments on commit 274c05d

Please sign in to comment.