diff --git a/web/push-notif/service-worker.js b/web/push-notif/service-worker.js --- a/web/push-notif/service-worker.js +++ b/web/push-notif/service-worker.js @@ -55,9 +55,7 @@ return baseErrorPayload; } -self.addEventListener('install', () => { - skipWaiting(); -}); +self.addEventListener('install', skipWaiting); self.addEventListener('activate', (event: ExtendableEvent) => { event.waitUntil(clients.claim()); @@ -171,7 +169,7 @@ ? 'https://web.comm.app' : 'http://localhost:3000/webapp'; const url = threadID ? baseURL + `/chat/thread/${threadID}/` : baseURL; - clients.openWindow(url); + await clients.openWindow(url); } })(), );