We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4eca1b commit e170da1Copy full SHA for e170da1
src/messaging/messaging.ts
@@ -53,7 +53,9 @@ export class AngularFireMessaging {
53
);
54
55
const tokenChanges = this.messaging.pipe(
56
- switchMap(messaging => new Observable(messaging.onTokenRefresh)),
+ switchMap(messaging => new Observable(messaging.onTokenRefresh.bind(messaging)).pipe(
57
+ switchMap(() => messaging.getToken())
58
+ )),
59
runOutsideAngular(zone)
60
61
@@ -62,7 +64,7 @@ export class AngularFireMessaging {
62
64
63
65
66
this.messages = this.messaging.pipe(
- switchMap(messaging => new Observable(messaging.onMessage)),
67
+ switchMap(messaging => new Observable(messaging.onMessage.bind(messaging))),
68
69
70
0 commit comments