mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
fix(web): correctly register notification service worker
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user