Skip to content

Commit cf87412

Browse files
committed
Move setting of useFcmOrGcmMethod to setOptions
1 parent f6724d1 commit cf87412

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/push-notifications.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ import {
2121
class PN {
2222
constructor(options) {
2323
this.setOptions(options);
24-
this.useFcmOrGcmMethod = this.settings.isLegacyGCM
25-
? GCM_METHOD
26-
: FCM_METHOD;
2724
}
2825

2926
setOptions(opts) {
@@ -32,6 +29,9 @@ class PN {
3229
this.apn.shutdown();
3330
}
3431
this.apn = new APN(this.settings.apn);
32+
this.useFcmOrGcmMethod = this.settings.isLegacyGCM
33+
? GCM_METHOD
34+
: FCM_METHOD;
3535
}
3636

3737
sendWith(method, regIds, data, cb) {

0 commit comments

Comments
 (0)