Skip to content

Commit e6a0664

Browse files
committed
fix for situations where login is called before subscribe
1 parent d2342cd commit e6a0664

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shared/managers/SubscriptionManager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ export class SubscriptionManager {
178178
if (!pushModel) {
179179
OneSignal.coreDirector.generatePushSubscriptionModel(rawPushSubscription);
180180
return UserDirector.createUserOnServer();
181+
182+
// Bug w/ v160400 release where isCreatingUser was improperly set and never reset
183+
// so a check if pushModel id is needed to recreate the user
184+
} else if (!pushModel.id) {
185+
return UserDirector.createUserOnServer();
181186
}
182187
// resubscribing. update existing push subscription model
183188
const serializedSubscriptionRecord = new FuturePushSubscriptionRecord(

0 commit comments

Comments
 (0)