Skip to content

Commit

Permalink
fix: remove service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 8, 2024
1 parent 2be0abc commit 05bb295
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions public/sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Self-Destroy service worker
*/

self.addEventListener("install", function (e) {
self.skipWaiting();
});

self.addEventListener("activate", function (e) {
self.registration
.unregister()
.then(function () {
return self.clients.matchAll();
})
.then(function (clients) {
clients.forEach((client) => client.navigate(client.url));
});
});

0 comments on commit 05bb295

Please sign in to comment.