Simpler fallback

This commit is contained in:
Jake Archibald
2020-12-09 22:03:34 +00:00
parent 722f1c806c
commit 5d691af8a1

View File

@ -1,14 +1,4 @@
// I accidentally shipped with the wrong service worker name.
// This picks up users that still might be using that version.
// We'll be able to delete this file eventually.
addEventListener('install', () => {
skipWaiting();
});
addEventListener('activate', async () => {
await self.registration.unregister();
const allClients = await clients.matchAll({
includeUncontrolled: true,
});
for (const client of allClients) client.navigate('/');
});
skipWaiting();