We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f89a207 commit 664fb2eCopy full SHA for 664fb2e
frontend/src/sw.ts
@@ -98,6 +98,15 @@ function handleWGRequest(event: FetchEvent) {
98
const event = e as CustomEvent;
99
resolve(event.detail);
100
}, {once: true});
101
+
102
+ // Claim all clients again. This is needed in case a window is forced to refresh
103
+ // since they drop out of the service workers clients afterwards.
104
+ try {
105
+ await self.clients.claim();
106
+ } catch (e) {
107
+ console.error("Service Worker failed to claim clients:", e);
108
+ }
109
110
const clients = await self.clients.matchAll();
111
for (const client of clients) {
112
client.postMessage(msg);
0 commit comments