Skip to content

Commit

Permalink
fix(web): correctly register notification service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
JagandeepBrar committed Sep 8, 2022
1 parent dcb5966 commit 579531c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/index.html
Expand Up @@ -60,6 +60,8 @@
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
navigator.serviceWorker.register('/firebase-messaging-sw.js');

// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
Expand Down

0 comments on commit 579531c

Please sign in to comment.