Skip to content

Commit

Permalink
fix(7575): Subscription failed - no active Service Worker
Browse files Browse the repository at this point in the history
  • Loading branch information
2manoj1 authored Aug 25, 2023
1 parent 5f6304d commit 1f99e4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/messaging/src/internals/token-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ async function getPushSubscription(
return subscription;
}

await swRegistration.serviceWorker.ready;

return swRegistration.pushManager.subscribe({
userVisibleOnly: true,
// Chrome <= 75 doesn't support base64-encoded VAPID key. For backward compatibility, VAPID key
Expand Down

0 comments on commit 1f99e4f

Please sign in to comment.